From 14421ac4aabbf9636ba0beebc4304191d3959905 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Fri, 1 Apr 2016 11:31:05 +0200 Subject: [PATCH] man/nmcli-examples: structure the screen examples better The synopsis tag is not appropriate and doesn't look well in HTML and inserts unnecessary line breaks in roff. The in suits this perfectly on the other hand. --- man/nmcli-examples.xml | 92 +++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 55 deletions(-) diff --git a/man/nmcli-examples.xml b/man/nmcli-examples.xml index 0ce7dc72c6..1f6a4b47aa 100644 --- a/man/nmcli-examples.xml +++ b/man/nmcli-examples.xml @@ -51,10 +51,8 @@ Copyright 2013 - 2014 Red Hat, Inc. Examples Listing available Wi-Fi APs - -$ nmcli device wifi list - +$ nmcli device wifi list * SSID MODE CHAN RATE SIGNAL BARS SECURITY netdatacomm_local Infra 6 54 Mbit/s 37 ▂▄__ WEP * F1 Infra 11 54 Mbit/s 98 ▂▄▆█ WPA1 @@ -76,10 +74,8 @@ $ nmcli device wifi list Showing general information and properties for a Wi-Fi interface - -$ nmcli -p -f general,wifi-properties device show wlan0 - +$ nmcli -p -f general,wifi-properties device show wlan0 =============================================================================== Device details (wlan0) =============================================================================== @@ -119,10 +115,8 @@ WIFI-PROPERTIES.ADHOC: yes Listing NetworkManager polkit permissions - -$ nmcli general permissions - +$ nmcli general permissions PERMISSION VALUE org.freedesktop.NetworkManager.enable-disable-network yes org.freedesktop.NetworkManager.enable-disable-wifi yes @@ -150,10 +144,8 @@ pkaction --action-id org.freedesktop.NetworkManager.network-control --verbose Listing NetworkManager log level and domains - -$ nmcli general logging - +$ nmcli general logging LEVEL DOMAINS INFO PLATFORM,RFKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,SHARING,SUPPLICANT,AGENTS,SETTINGS,SUSPEND,CORE,DEVICE,OLPC,WIMAX,INFINIBAND,FIREWALL,ADSL,BOND,VLAN,BRIDGE,DBUS_PROPS,TEAM,CONCHECK,DCB,DISPATCH @@ -163,10 +155,10 @@ INFO PLATFORM,RFKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,WIFI_SCAN,IP4,IP6,AUTOIP Changing NetworkManager logging - -$ nmcli g log level DEBUG domains CORE,ETHER,IP -$ nmcli g log level INFO domains DEFAULT - + +$ nmcli g log level DEBUG domains CORE,ETHER,IP +$ nmcli g log level INFO domains DEFAULT + The first command makes NetworkManager log in DEBUG level, and only for CORE, ETHER and @@ -176,11 +168,11 @@ $ nmcli g log level INFO domains DEFAULT Adding a bonding master and two slave connection profiles - -$ nmcli con add type bond ifname mybond0 mode active-backup -$ nmcli con add type ethernet ifname eth1 master mybond0 -$ nmcli con add type ethernet ifname eth2 master mybond0 - + +$ nmcli con add type bond ifname mybond0 mode active-backup +$ nmcli con add type ethernet ifname eth1 master mybond0 +$ nmcli con add type ethernet ifname eth2 master mybond0 + This example demonstrates adding a bond master connection and two slaves. The @@ -192,11 +184,11 @@ $ nmcli con add type ethernet ifname eth2 master mybond0 Adding a team master and two slave connection profiles - -$ nmcli con add type team con-name Team1 ifname Team1 config team1-master-json.conf -$ nmcli con add type ethernet con-name Team1-slave1 ifname em1 master Team1 -$ nmcli con add type ethernet con-name Team1-slave2 ifname em2 master Team1 - + +$ nmcli con add type team con-name Team1 ifname Team1 config team1-master-json.conf +$ nmcli con add type ethernet con-name Team1-slave1 ifname em1 master Team1 +$ nmcli con add type ethernet con-name Team1-slave2 ifname em2 master Team1 + This example demonstrates adding a team master connection profile and two slaves. It is @@ -210,22 +202,22 @@ $ nmcli con add type ethernet con-name Team1-slave2 ifname em2 master Team1 em2. The slaves don't specify config and thus teamd will use its default configuration. You will activate the whole setup by activating both slaves: - -$ nmcli con up Team1-slave1 -$ nmcli con up Team1-slave2 - + +$ nmcli con up Team1-slave1 +$ nmcli con up Team1-slave2 + By default, the created profiles are marked for auto-activation. But if another connection has been activated on the device, the new profile won't activate automatically and you need to activate it manually. Adding a bridge and two slave profiles - -$ nmcli con add type bridge con-name TowerBridge ifname TowerBridge -$ nmcli con add type ethernet con-name br-slave-1 ifname ens3 master TowerBridge -$ nmcli con add type ethernet con-name br-slave-2 ifname ens4 master TowerBridge -$ nmcli con modify TowerBridge bridge.stp no - + +$ nmcli con add type bridge con-name TowerBridge ifname TowerBridge +$ nmcli con add type ethernet con-name br-slave-1 ifname ens3 master TowerBridge +$ nmcli con add type ethernet con-name br-slave-2 ifname ens4 master TowerBridge +$ nmcli con modify TowerBridge bridge.stp no + This example demonstrates adding a bridge master connection and two slaves. The @@ -239,15 +231,13 @@ $ nmcli con modify TowerBridge bridge.stp no Adding an ethernet connection profile with manual IP configuration - - -$ nmcli con add con-name my-con-em1 ifname em1 type ethernet ip4 192.168.100.100/24 gw4 192.168.100.1 ip4 1.2.3.4 ip6 abbe::cafe -$ nmcli con mod my-con-em1 ipv4.dns "8.8.8.8 8.8.4.4" -$ nmcli con mod my-con-em1 +ipv4.dns 1.2.3.4 -$ nmcli con mod my-con-em1 ipv6.dns "2001:4860:4860::8888 2001:4860:4860::8844" -$ nmcli -p con show my-con-em1 - - + +$ nmcli con add con-name my-con-em1 ifname em1 type ethernet ip4 192.168.100.100/24 gw4 192.168.100.1 ip4 1.2.3.4 ip6 abbe::cafe +$ nmcli con mod my-con-em1 ipv4.dns "8.8.8.8 8.8.4.4" +$ nmcli con mod my-con-em1 +ipv4.dns 1.2.3.4 +$ nmcli con mod my-con-em1 ipv6.dns "2001:4860:4860::8888 2001:4860:4860::8844" +$ nmcli -p con show my-con-em1 + The first command adds an Ethernet connection profile named my-con-em1 @@ -263,12 +253,8 @@ $ nmcli -p con show my-con-em1 Escaping colon characters in tabular mode - - -$ nmcli -t -f general -e yes -m tab dev show eth0 - - +$ nmcli -t -f general -e yes -m tab dev show eth0 GENERAL:eth0:ethernet:Intel Corporation:82567LM Gigabit Network Connection:e1000e:2.1.4-k:1.8-3:00\:22\:68\:15\:29\:21:1500:100 (connected):0 (No reason given):/sys/devices/pci0000\:00/0000\:00\:19.0/net/eth0:eth0:yes:yes:no:ethernet-13:89cbcbc6-dc85-456c-9c8b-bd828fee3917:/org/freedesktop/NetworkManager/ActiveConnection/9 @@ -316,12 +302,8 @@ fi Example sessions of interactive connection editor Adding an ethernet connection profile in interactive editor (a) - - -$ nmcli connection edit type ethernet - - +$ nmcli connection edit type ethernet ===| nmcli interactive connection editor |===