From af35a577bd3fd685b5bbe15bd3dfc5e057883d84 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Wed, 6 Apr 2016 15:14:02 +0200 Subject: [PATCH] man: fix prompt and user input formatting (cherry picked from commit f73649db5c0e0b84ca7eff68248c289029c94948) --- man/nmcli-examples.xml | 73 +++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/man/nmcli-examples.xml b/man/nmcli-examples.xml index df12874a13..7b167edc9f 100644 --- a/man/nmcli-examples.xml +++ b/man/nmcli-examples.xml @@ -55,7 +55,7 @@ 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,7 +76,7 @@ Copyright 2013 - 2014 Red Hat, Inc. 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) =========================================================================== @@ -116,7 +116,7 @@ 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 @@ -143,7 +143,7 @@ org.freedesktop.NetworkManager.settings.modify.hostname auth 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,A UTOIP4,DNS,VPN,SHARING,SUPPLICANT,AGENTS,SETTINGS,SUSPEND,CORE,DEVICE,OLPC, @@ -153,10 +153,9 @@ B,DISPATCH This command shows current NetworkManager logging status. - 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 IP domains. The second command restores the default logging state. Please refer to the @@ -166,9 +165,9 @@ B,DISPATCH 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 first command adds a master bond connection, naming the bonding interface @@ -180,9 +179,9 @@ B,DISPATCH 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 very similar to the bonding example. The first command adds a master team profile, naming @@ -195,8 +194,8 @@ B,DISPATCH 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. @@ -204,10 +203,10 @@ B,DISPATCH 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 first command adds a master bridge connection, naming the bridge interface and @@ -221,12 +220,12 @@ B,DISPATCH Adding an ethernet connection profile with manual IP configuration -$ nmcli con add con-name my-con-em1 ifname em1 type ethernet \ +$ 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 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 that is bound to interface name em1. The profile is configured @@ -242,7 +241,7 @@ B,DISPATCH 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 reas on given):/sys/devices/pci0000\:00/0000\:00\:19.0/net/eth0:eth0:yes:yes:no: @@ -292,7 +291,7 @@ 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 |=== @@ -303,7 +302,7 @@ Type 'describe [<setting>.<prop>]' for detailed property description You may edit the following settings: connection, 802-3-ethernet (ethernet), 802-1x, ipv4, ipv6, dcb -nmcli> print +nmcli> print =========================================================================== Connection details =========================================================================== @@ -363,13 +362,13 @@ ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.dhcp-hostname: -- --------------------------------------------------------------------------- -nmcli> goto ethernet +nmcli> goto ethernet You may edit the following properties: port, speed, duplex, auto-negotiate, mac-address, cloned-mac-address, mac-address-blacklist, mtu, s390-subchann els, s390-nettype, s390-options nmcli 802-3-ethernet> set mtu 1492 nmcli 802-3-ethernet> b -nmcli> goto ipv4.addresses +nmcli> goto ipv4.addresses nmcli ipv4.addresses> desc === [addresses] === @@ -390,10 +389,10 @@ nmcli ipv4.addresses> print addresses: 192.168.1.100/24 nmcli ipv4.addresses> back nmcli ipv4> b -nmcli> set ipv4.gateway 192.168.1.1 -nmcli> verify +nmcli> set ipv4.gateway 192.168.1.1 +nmcli> verify Verify connection: OK -nmcli> print +nmcli> print =========================================================================== Connection details =========================================================================== @@ -452,8 +451,8 @@ ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.dhcp-hostname: -- --------------------------------------------------------------------------- -nmcli> set ipv4.dns 8.8.8.8 8.8.4.4 -nmcli> print +nmcli> set ipv4.dns 8.8.8.8 8.8.4.4 +nmcli> print =========================================================================== Connection details =========================================================================== @@ -513,12 +512,12 @@ ipv6.may-fail: yes ipv6.ip6-privacy: -1 (unknown) ipv6.dhcp-hostname: -- --------------------------------------------------------------------------- -nmcli> verify +nmcli> verify Verify connection: OK -nmcli> save +nmcli> save Connection 'ethernet-4' (de89cdeb-a3e1-4d53-8fa0-c22546c775f4) successfully saved. -nmcli> quit +nmcli> quit Example session in the nmcli interactive connection editor. The scenario creates an Ethernet connection profile with static addressing (IPs and DNS).