diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2014-02-17 12:42:17 +0100 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2014-02-28 10:31:41 +0100 |
commit | c1ace1b5b2e6815fd1e6cfe650218b0de32d7d76 (patch) | |
tree | f68f3d65df790523a2954fbb9f3f8ee643b1f83c /man | |
parent | 363ec8de685dde94bf261a1b5c445a0d0915fe58 (diff) | |
download | NetworkManager-c1ace1b5b2e6815fd1e6cfe650218b0de32d7d76.tar.gz |
cli: support removing items from container-type properties in 'nmcli con modify'
Synopsis:
nmcli con modify -<property>.<setting> <value>
'value' can be empty ("") to remove the whole property value value (in this
case the behaviour is the same as without '-').
Or the 'value' is an index of the item to remove, or an option name (for a few
properties that have option names, like bond.options or ethernet.s390-options).
$ nmcli con mod myeth ipv4.dns "10.0.0.55 10.0.0.66 8.8.8.8 8.8.4.4"
---> ipv4.dns: 10.0.0.55, 10.0.0.66, 8.8.8.8, 8.8.4.4
$ nmcli con mod myeth -ipv4.dns 1
---> ipv4.dns: 10.0.0.55, 8.8.8.8, 8.8.4.4
---> bond.options: mode=balance-rr
$ nmcli con mod bond0 +bond.options "mii=500, downdelay=800"
---> bond.options: downdelay=800,miimon=500,mode=balance-rr
$ nmcli con mod bond0 -bond.options downdelay
---> bond.options: miimon=500,mode=balance-rr
Diffstat (limited to 'man')
-rw-r--r-- | man/nmcli.1.in | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/man/nmcli.1.in b/man/nmcli.1.in index 714efa89a2..a140b369c6 100644 --- a/man/nmcli.1.in +++ b/man/nmcli.1.in @@ -619,8 +619,8 @@ See also \fInm-settings\fP(5) for all NetworkManager settings and property names descriptions; and \fInmcli-examples\fP(5) for sample editor sessions. .RE .TP -.B modify [--temporary] [ id | uuid | path ] <ID> [+]<setting>.<property> <value> -.B [+]<setting>.<property> <value> ... +.B modify [--temporary] [ id | uuid | path ] <ID> [+|-]<setting>.<property> <value> +.B [+|-]<setting>.<property> <value> ... .br Modify one or more properties in the connection profile. .br @@ -632,10 +632,12 @@ and \fIproperty name\fP provided they are unique. Empty \fIvalue\fP ("") removes the property value (sets the property to the default value). The provided value overwrite the existing property value. If you want to append to the existing value instead, use \fI+\fP prefix for the property name. -But it only has a real effect for multi-value (container) properties like ipv4.dns, -ipv4.addresses, etc. +If you want to remove just one item from container-type property, use \fI-\fP +prefix for the property name and specify its index (or option name) as +\fIvalue\fP. Of course, it only has a real effect for multi-value (container) +properties like ipv4.dns, ipv4.addresses, bond.options, etc. .br -The changed values will be saved persistently by NetworkManager, unless +The changes will be saved persistently by NetworkManager, unless \fI--temporary\fP option is provided, in which case the changes won't persist over NetworkManager restart. .TP |