NetworkManager/clients/cli
Thomas Haller 1d6c2601b0
cli: don't fail nmcli con modify $PROFILE remove $SETTING for non-existing setting
Removing a setting that is not present should not be an error. The user
asked that the profile doesn't have the requested setting, and that
should succeed (even if that results in no actual change).

Consider when you want to make a hotspot profile "open". That implies
to remove the "wifi-sec" and "802-1x" settings. But you may
not check before whether the profile is already open, and whether
it already has those settings. We should just allow

  $ nmcli connection modify "$PROFILE" remove wifi-sec remove 802-1x

to succeed, regardless whether this changes anything or not.

Likewise, if you do

  $ nmcli connection modify "$PROFILE" con-name foo
  $ nmcli connection modify "$PROFILE" con-name foo

then the second command doesn't fail with "the name is
already \"foo\"". It just succeeds.
2020-11-18 09:56:16 +01:00
..
agent.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
common.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
common.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
connections.c cli: don't fail nmcli con modify $PROFILE remove $SETTING for non-existing setting 2020-11-18 09:56:16 +01:00
connections.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
devices.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
devices.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
general.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
generate-docs-nm-settings-nmcli.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
generate-docs-nm-settings-nmcli.xml.in all: add hostname setting 2020-11-16 16:43:39 +01:00
meson.build build: rename "tools/check-settings-docs.sh" to "check-compare-generated.sh" 2020-11-03 15:41:39 +01:00
nmcli-completion cli: make nmcli do its own command completion 2017-02-13 16:32:15 +01:00
nmcli.c cli: introduce NmcColorPalette struct instead of plain array 2020-10-09 09:52:10 +02:00
nmcli.h cli: introduce NmcColorPalette struct instead of plain array 2020-10-09 09:52:10 +02:00
polkit-agent.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
polkit-agent.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
settings.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
settings.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
utils.c cli: introduce NmcColorPalette struct instead of plain array 2020-10-09 09:52:10 +02:00
utils.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00