Commit 14421ac4 authored by Lubomir Rintel's avatar Lubomir Rintel 🥕
Browse files

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 <userinput> in <screen> suits this perfectly on the other hand.
parent 6fb80e10
......@@ -51,10 +51,8 @@ Copyright 2013 - 2014 Red Hat, Inc.
<title>Examples</title>
<example><title>Listing available Wi-Fi APs</title>
<synopsis><emphasis role="bold">
$ nmcli device wifi list
</emphasis></synopsis>
<screen>
<userinput>$ nmcli device wifi list</userinput>
* 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
</para>
<example><title>Showing general information and properties for a Wi-Fi interface</title>
<synopsis><emphasis role="bold">
$ nmcli -p -f general,wifi-properties device show wlan0
</emphasis></synopsis>
<screen>
<userinput>$ nmcli -p -f general,wifi-properties device show wlan0</userinput>
===============================================================================
Device details (wlan0)
===============================================================================
......@@ -119,10 +115,8 @@ WIFI-PROPERTIES.ADHOC: yes
</para>
<example><title>Listing NetworkManager polkit permissions</title>
<synopsis><emphasis role="bold">
$ nmcli general permissions
</emphasis></synopsis>
<screen>
<userinput>$ nmcli general permissions</userinput>
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
</para>
<example><title>Listing NetworkManager log level and domains</title>
<synopsis><emphasis role="bold">
$ nmcli general logging
</emphasis></synopsis>
<screen>
<userinput>$ nmcli general logging</userinput>
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
</screen>
......@@ -163,10 +155,10 @@ INFO PLATFORM,RFKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,WIFI_SCAN,IP4,IP6,AUTOIP
</para>
<example><title>Changing NetworkManager logging</title>
<synopsis><emphasis role="bold">
$ nmcli g log level DEBUG domains CORE,ETHER,IP
$ nmcli g log level INFO domains DEFAULT
</emphasis></synopsis>
<screen>
<userinput>$ nmcli g log level DEBUG domains CORE,ETHER,IP</userinput>
<userinput>$ nmcli g log level INFO domains DEFAULT</userinput>
</screen>
</example>
<para>
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
</para>
<example><title>Adding a bonding master and two slave connection profiles</title>
<synopsis><emphasis role="bold">
$ 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
</emphasis></synopsis>
<screen>
<userinput>$ nmcli con add type bond ifname mybond0 mode active-backup</userinput>
<userinput>$ nmcli con add type ethernet ifname eth1 master mybond0</userinput>
<userinput>$ nmcli con add type ethernet ifname eth2 master mybond0</userinput>
</screen>
</example>
<para>
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
</para>
<example><title>Adding a team master and two slave connection profiles</title>
<synopsis><emphasis role="bold">
$ 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
</emphasis></synopsis>
<screen>
<userinput>$ nmcli con add type team con-name Team1 ifname Team1 config team1-master-json.conf</userinput>
<userinput>$ nmcli con add type ethernet con-name Team1-slave1 ifname em1 master Team1</userinput>
<userinput>$ nmcli con add type ethernet con-name Team1-slave2 ifname em2 master Team1</userinput>
</screen>
</example>
<para>
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
<emphasis>em2</emphasis>. The slaves don't specify <emphasis>config</emphasis> and thus
<emphasis>teamd</emphasis> will use its default configuration. You will activate the whole setup
by activating both slaves:
<synopsis><emphasis role="bold">
$ nmcli con up Team1-slave1
$ nmcli con up Team1-slave2
</emphasis></synopsis>
<screen>
<userinput>$ nmcli con up Team1-slave1</userinput>
<userinput>$ nmcli con up Team1-slave2</userinput>
</screen>
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.
</para>
<example><title>Adding a bridge and two slave profiles</title>
<synopsis><emphasis role="bold">
$ 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
</emphasis></synopsis>
<screen>
<userinput>$ nmcli con add type bridge con-name TowerBridge ifname TowerBridge</userinput>
<userinput>$ nmcli con add type ethernet con-name br-slave-1 ifname ens3 master TowerBridge</userinput>
<userinput>$ nmcli con add type ethernet con-name br-slave-2 ifname ens4 master TowerBridge</userinput>
<userinput>$ nmcli con modify TowerBridge bridge.stp no</userinput>
</screen>
</example>
<para>
This example demonstrates adding a bridge master connection and two slaves. The
......@@ -239,15 +231,13 @@ $ nmcli con modify TowerBridge bridge.stp no
</para>
<example><title>Adding an ethernet connection profile with manual IP configuration</title>
<synopsis>
<emphasis role="bold">
$ 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
</emphasis>
</synopsis>
<screen>
<userinput>$ 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</userinput>
<userinput>$ nmcli con mod my-con-em1 ipv4.dns "8.8.8.8 8.8.4.4"</userinput>
<userinput>$ nmcli con mod my-con-em1 +ipv4.dns 1.2.3.4</userinput>
<userinput>$ nmcli con mod my-con-em1 ipv6.dns "2001:4860:4860::8888 2001:4860:4860::8844"</userinput>
<userinput>$ nmcli -p con show my-con-em1</userinput>
</screen>
</example>
<para>
The first command adds an Ethernet connection profile named <emphasis>my-con-em1</emphasis>
......@@ -263,12 +253,8 @@ $ nmcli -p con show my-con-em1
</para>
<example><title>Escaping colon characters in tabular mode</title>
<synopsis>
<emphasis role="bold">
$ nmcli -t -f general -e yes -m tab dev show eth0
</emphasis>
</synopsis>
<screen>
<userinput>$ nmcli -t -f general -e yes -m tab dev show eth0</userinput>
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
</screen>
</example>
......@@ -316,12 +302,8 @@ fi
<para><emphasis role="bold">Example sessions of interactive connection editor</emphasis></para>
<example><title>Adding an ethernet connection profile in interactive editor (a)</title>
<synopsis>
<emphasis role="bold">
$ nmcli connection edit type ethernet
</emphasis>
</synopsis>
<screen>
<userinput>$ nmcli connection edit type ethernet</userinput>
===| nmcli interactive connection editor |===
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment