summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2021-07-09 16:42:52 +0200
committerThomas Haller <thaller@redhat.com>2021-07-09 16:42:52 +0200
commit0c5a61fda6672718d6cb71398f42353aed09e2af (patch)
treec1954912427ae3a89be46fe6b6801c0afb081930
parent478754a5048288b705de624c85e7d2eed7e8c8cf (diff)
parenta09ade23e157e15411377e776538d57815d4164d (diff)
downloadNetworkManager-0c5a61fda6672718d6cb71398f42353aed09e2af.tar.gz
cli: merge branch 'vbubela:add-nmcli-connection-synonyms'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/678 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/909
-rw-r--r--man/nmcli.xml39
-rw-r--r--src/nmcli/devices.c14
2 files changed, 40 insertions, 13 deletions
diff --git a/man/nmcli.xml b/man/nmcli.xml
index bc72c3110b..c2b867ddb8 100644
--- a/man/nmcli.xml
+++ b/man/nmcli.xml
@@ -902,7 +902,7 @@
until reboot or until the user performs an action that unblocks autoconnect,
like modifying the profile or explicitly activating it.</para>
- <para>In most cases you may want to use <command>device disconnect</command>
+ <para>In most cases you may want to use <command>device down</command>
command instead.</para>
<para>The connection is identified by its name, UUID or D-Bus path. If
@@ -910,7 +910,7 @@
<option>uuid</option>, <option>path</option> or
<option>apath</option> can be used.</para>
- <para> See <command>connection show</command> above for the description of
+ <para>See <command>connection show</command> above for the description of
the <replaceable>ID</replaceable>-specifying keywords.</para>
<para>If <option>--wait</option> option is not specified, the default timeout
@@ -1323,9 +1323,11 @@
<arg choice='plain'><command>status</command></arg>
<arg choice='plain'><command>show</command></arg>
<arg choice='plain'><command>set</command></arg>
+ <arg choice='plain'><command>up</command></arg>
<arg choice='plain'><command>connect</command></arg>
<arg choice='plain'><command>reapply</command></arg>
<arg choice='plain'><command>modify</command></arg>
+ <arg choice='plain'><command>down</command></arg>
<arg choice='plain'><command>disconnect</command></arg>
<arg choice='plain'><command>delete</command></arg>
<arg choice='plain'><command>monitor</command></arg>
@@ -1391,7 +1393,7 @@
<varlistentry>
<term>
- <command>connect</command>
+ <command>up</command>
<arg choice='plain'><replaceable>ifname</replaceable></arg>
</term>
@@ -1403,7 +1405,7 @@
<para>If no compatible connection exists, a new profile with default
settings will be created and activated. This differentiates
<command>nmcli connection up ifname "$DEVICE"</command> from
- <command>nmcli device connect "$DEVICE"</command></para>
+ <command>nmcli device up "$DEVICE"</command></para>
<para>If <option>--wait</option> option is not specified, the default timeout will be 90
seconds.</para>
@@ -1412,6 +1414,18 @@
<varlistentry>
<term>
+ <command>connect</command>
+ <arg choice='plain'><replaceable>ifname</replaceable></arg>
+ </term>
+
+ <listitem>
+ <para>Alias for command <command>up</command>. Before version 1.34.0 <command>up</command>
+ was not supported.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
<command>reapply</command>
<arg choice='plain'><replaceable>ifname</replaceable></arg>
</term>
@@ -1448,7 +1462,7 @@
<varlistentry>
<term>
- <command>disconnect</command>
+ <command>down</command>
<arg choice='plain' rep='repeat'><replaceable>ifname</replaceable></arg>
</term>
@@ -1462,6 +1476,17 @@
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>
+ <command>disconnect</command>
+ <arg choice='plain' rep='repeat'><replaceable>ifname</replaceable></arg>
+ </term>
+
+ <listitem>
+ <para>Alias for command <command>down</command>. Before version 1.34.0 <command>down</command>
+ was not supported.</para>
+ </listitem>
+ </varlistentry>
<varlistentry>
<term>
@@ -1647,7 +1672,7 @@
according to Wi-Fi device capabilities and activates it on the device. The
hotspot is secured with WPA if device/driver supports that, otherwise WEP is
used. Use <command>connection down</command> or <command>device
- disconnect</command> to stop the hotspot.</para>
+ down</command> to stop the hotspot.</para>
<para>Parameters of the hotspot can be influenced by the optional
parameters:</para>
@@ -2331,7 +2356,7 @@
</varlistentry>
<varlistentry>
- <term><userinput>nmcli dev disconnect em2</userinput></term>
+ <term><userinput>nmcli dev down em2</userinput></term>
<listitem>
<para>disconnects a connection on interface em2 and marks the device as
unavailable for auto-connecting. As a result, no connection will automatically
diff --git a/src/nmcli/devices.c b/src/nmcli/devices.c
index 0cb347f50f..33be4e7a6d 100644
--- a/src/nmcli/devices.c
+++ b/src/nmcli/devices.c
@@ -5020,17 +5020,19 @@ void
nmc_command_func_device(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv)
{
static const NMCCommand cmds[] = {
- {"status", do_devices_status, usage_device_status, TRUE, TRUE},
- {"show", do_device_show, usage_device_show, TRUE, TRUE},
{"connect", do_device_connect, usage_device_connect, TRUE, TRUE},
- {"reapply", do_device_reapply, usage_device_reapply, TRUE, TRUE},
{"disconnect", do_devices_disconnect, usage_device_disconnect, TRUE, TRUE},
{"delete", do_devices_delete, usage_device_delete, TRUE, TRUE},
- {"set", do_device_set, usage_device_set, TRUE, TRUE},
- {"monitor", do_devices_monitor, usage_device_monitor, TRUE, TRUE},
- {"wifi", do_device_wifi, usage_device_wifi, FALSE, FALSE},
+ {"down", do_devices_disconnect, usage_device_disconnect, TRUE, TRUE},
{"lldp", do_device_lldp, usage_device_lldp, FALSE, FALSE},
+ {"monitor", do_devices_monitor, usage_device_monitor, TRUE, TRUE},
{"modify", do_device_modify, usage_device_modify, TRUE, TRUE},
+ {"reapply", do_device_reapply, usage_device_reapply, TRUE, TRUE},
+ {"status", do_devices_status, usage_device_status, TRUE, TRUE},
+ {"set", do_device_set, usage_device_set, TRUE, TRUE},
+ {"show", do_device_show, usage_device_show, TRUE, TRUE},
+ {"up", do_device_connect, usage_device_connect, TRUE, TRUE},
+ {"wifi", do_device_wifi, usage_device_wifi, FALSE, FALSE},
{NULL, do_devices_status, usage, TRUE, TRUE},
};