about summary refs log tree commit diff
path: root/docs/api/html/nmcli-examples.html
diff options
context:
space:
mode:
authorJeremy Bicha <jeremy.bicha@canonical.com>2022-08-18 08:31:29 -0400
committerJeremy Bicha <jeremy.bicha@canonical.com>2022-08-18 08:31:29 -0400
commitb0887dd4d035acc0d84aa859748d36891548eaaf (patch)
treec4dc0dae50954f3c8fb600aa9e7cfaabeb80deb0 /docs/api/html/nmcli-examples.html
parent1a62dcfdc0470be37743914da69fe0b0677c6bfb (diff)
parent4741f1a52215c7ba466140912084d6906185bef3 (diff)
Merge branch 'debian/master' into ubuntu/master
Diffstat (limited to 'docs/api/html/nmcli-examples.html')
-rw-r--r--docs/api/html/nmcli-examples.html60
1 files changed, 58 insertions, 2 deletions
diff --git a/docs/api/html/nmcli-examples.html b/docs/api/html/nmcli-examples.html
index 075c0d3c..0a832ab7 100644
--- a/docs/api/html/nmcli-examples.html
+++ b/docs/api/html/nmcli-examples.html
@@ -8,7 +8,7 @@
 <link rel="up" href="manpages.html" title="Part I. Manual Pages">
 <link rel="prev" href="nmcli.html" title="nmcli">
 <link rel="next" href="nmtui.html" title="nmtui">
-<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -633,6 +633,62 @@ Connection 'ethernet-4' (de89cdeb-a3e1-4d53-8fa0-c22546c775f4) successfully
 <pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>nmcli connection add type bluetooth con-name "My Bluetooth Hotspot" autoconnect no ifname btnap0 bluetooth.type nap ipv4.method shared ipv6.method shared</code></strong></pre>
 </div>
 </div>
+<br class="example-break"><div class="example">
+<a name="id-1.2.7.6.20"></a><p class="title"><b>Example 18. Offline use</b></p>
+<div class="example-contents">
+<pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>nmcli --offline con add type ethernet '
+  conn.id eth0 \
+  conn.interface-name eth0 \
+  &gt;/sysroot/etc/NetworkManager/system-connections/eth0.nmconnection</code></strong></pre>
+<p>
+        Creates a connection file in keyfile format without using the NetworkManager service.
+        This allows for use of familiar <span class="command"><strong>nmcli</strong></span> 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.
+      </p>
+<pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>nmcli --offline con modify type ethernet '
+  conn.id eth0-ipv6 \
+  ipv4.method disabled \
+  &lt;/sysroot/etc/NetworkManager/system-connections/eth0.nmconnection \
+  &gt;/sysroot/etc/NetworkManager/system-connections/eth0-ipv6.nmconnection</code></strong></pre>
+<p>
+        Read and write a connection file without using the NetworkManager service, modifying
+        some properties along the way.
+      </p>
+<p>
+        This allows templating of the connection profiles using familiar
+        <span class="command"><strong>nmcli</strong></span> syntax in situations where the service is not running.
+      </p>
+</div>
+</div>
+<br class="example-break"><div class="example">
+<a name="id-1.2.7.6.21"></a><p class="title"><b>Example 19. Device Checkpoint and Restore</b></p>
+<div class="example-contents">
+<pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>nmcli dev checkpoint eth0 -- nmcli dev dis eth0</code></strong>
+Device 'eth0' successfully disconnected.
+Type "Yes" to commit the changes: No
+Checkpoint was removed.</pre>
+<p>
+        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.
+      </p>
+<p>
+        If the command being run unintentionaly brings down the remote connection
+        (such as a
+        <span class="citerefentry"><span class="refentrytitle">ssh</span>(1)</span>
+        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.
+      </p>
+<p>
+        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:
+      </p>
+<pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>nmcli dev checkpoint -- ip link del br0</code></strong>
+Type "Yes" to commit the changes: <strong class="userinput"><code>Yes</code></strong></pre>
+</div>
+</div>
 <br class="example-break">
 </div>
 <div class="refsect1">
@@ -649,6 +705,6 @@ Connection 'ethernet-4' (de89cdeb-a3e1-4d53-8fa0-c22546c775f4) successfully
 </div>
 </div>
 <div class="footer">
-<hr>Generated by GTK-Doc V1.33.0</div>
+<hr>Generated by GTK-Doc V1.33.1</div>
 </body>
 </html>
\ No newline at end of file