diff options
| author | Michael Biebl <biebl@debian.org> | 2022-10-04 00:56:46 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2022-10-04 00:56:46 +0200 |
| commit | 3612e6355f3f40d264ec4657547761069baa5430 (patch) | |
| tree | 768e4f5b37b66f540dd7030aa2eaff2ac7bb0168 /man/nmcli-examples.xml | |
| parent | 7e9f00a3be8f65535e6620b344443ec4d403212b (diff) | |
| parent | 6f7fcde10e47d8af865af336becf1fd8a446e62e (diff) | |
Merge tag 'debian/1.40.0-1' into debian/bullseye-backports
network-manager Debian release 1.40.0-1
Diffstat (limited to 'man/nmcli-examples.xml')
| -rw-r--r-- | man/nmcli-examples.xml | 55 |
1 files changed, 54 insertions, 1 deletions
diff --git a/man/nmcli-examples.xml b/man/nmcli-examples.xml index 5744ad12..1fd7b766 100644 --- a/man/nmcli-examples.xml +++ b/man/nmcli-examples.xml @@ -9,7 +9,7 @@ <!-- nmcli-examples(7) manual page - Copyright 2005 - 2016 Red Hat, Inc. + Copyright 2005 - 2022 Red Hat, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 @@ -614,6 +614,59 @@ Connection 'ethernet-4' (de89cdeb-a3e1-4d53-8fa0-c22546c775f4) successfully <screen><prompt>$ </prompt><userinput>nmcli connection add type bluetooth con-name "My Bluetooth Hotspot" autoconnect no ifname btnap0 bluetooth.type nap ipv4.method shared ipv6.method shared</userinput></screen> </example> + <example><title>Offline use</title> +<screen><prompt>$ </prompt><userinput>nmcli --offline con add type ethernet ' + conn.id eth0 \ + conn.interface-name eth0 \ + >/sysroot/etc/NetworkManager/system-connections/eth0.nmconnection</userinput></screen> + <para> + Creates a connection file in keyfile format without using the NetworkManager service. + This allows for use of familiar <command>nmcli</command> syntax in situations + where the service is not running, such as during system installation of image + provisioning and ensures the resulting file is correctly formatted. + </para> +<screen><prompt>$ </prompt><userinput>nmcli --offline con modify type ethernet ' + conn.id eth0-ipv6 \ + ipv4.method disabled \ + </sysroot/etc/NetworkManager/system-connections/eth0.nmconnection \ + >/sysroot/etc/NetworkManager/system-connections/eth0-ipv6.nmconnection</userinput></screen> + <para> + Read and write a connection file without using the NetworkManager service, modifying + some properties along the way. + </para> + <para> + This allows templating of the connection profiles using familiar + <command>nmcli</command> syntax in situations where the service is not running. + </para> + </example> + + <example><title>Device Checkpoint and Restore</title> + +<screen><prompt>$ </prompt><userinput>nmcli dev checkpoint eth0 -- nmcli dev dis eth0</userinput> +Device 'eth0' successfully disconnected. +Type "Yes" to commit the changes: No +Checkpoint was removed.</screen> + <para> + In this example the device eth0 was disconnected with the eth0 checkpoint + taken. The user didn't confirm that the change is good, so the eth0 was + brought back to the state it was when the checkpoint was taken. + </para> + <para> + If the command being run unintentionaly brings down the remote connection + (such as a + <citerefentry><refentrytitle>ssh</refentrytitle><manvolnum>1</manvolnum></citerefentry> + session) to the very machine it's being run on, the user wouldn't be able to + confirm the success and the connectivity would end up being restored + after a timeout. + </para> + <para> + If, on the other hand, the command results in a success, the user could just + confirm, causing the checkpoint to be abandoned without a rollback: + </para> +<screen><prompt>$ </prompt><userinput>nmcli dev checkpoint -- ip link del br0</userinput> +Type "Yes" to commit the changes: <userinput>Yes</userinput></screen> + </example> + </refsect1> <refsect1> |