systemctl: add --clean= values to documentation and shell completion
authorLuca Boccassi <bluca@debian.org>
Mon, 8 Apr 2024 01:20:18 +0000 (02:20 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 18 Apr 2024 12:07:07 +0000 (14:07 +0200)
man/org.freedesktop.systemd1.xml
man/systemctl.xml
shell-completion/bash/systemctl.in

index 6e90662fa9ee416ea7063c59b9079846b9b54826..f60b3ba702852ddd63e6dc7fc1c87c1aac3acc8a 100644 (file)
@@ -575,8 +575,6 @@ node /org/freedesktop/systemd1 {
 
     <!--method EnqueueUnitJob is not documented!-->
 
-    <!--method CleanUnit is not documented!-->
-
     <!--method FreezeUnit is not documented!-->
 
     <!--method ThawUnit is not documented!-->
@@ -1585,6 +1583,12 @@ node /org/freedesktop/systemd1 {
       shouldn't be bound to a lifecycle of the service, e.g. they should continue running after the restart
       of the service. Note that the main PID of the service can not be migrated to an auxiliary scope.
       Also, <varname>flags</varname> argument must be 0 and is reserved for future extensions.</para>
+
+      <para><function>CleanUnit()</function> deletes the configuration, state, logs, cache and runtime data
+      directories and clear out the file descriptors store for the unit, as specified in the mask
+      parameters. The possible values are <literal>configuration</literal>, <literal>state</literal>,
+      <literal>logs</literal>, <literal>cache</literal>, <literal>runtime</literal>,
+      <literal>fdstore</literal>, and <literal>all</literal>.</para>
     </refsect2>
 
     <refsect2>
index ca101d5b75cd937cd1f73a055812d4aae47eccfe..a8bc85707b6600547df5484f2ebd19f1c99c5310 100644 (file)
@@ -569,6 +569,51 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
             these three types of resources are generally redundant and reproducible on the next invocation of
             the unit). Note that the specified units must be stopped to invoke this operation.</para>
 
+            <table>
+              <title>
+                Possible values for <option>--what=</option>
+              </title>
+
+              <tgroup cols='2'>
+                <thead>
+                  <row>
+                    <entry>Value</entry>
+                    <entry>Unit Setting</entry>
+                  </row>
+                </thead>
+                <tbody>
+                  <row>
+                    <entry><literal>runtime</literal></entry>
+                    <entry><varname>RuntimeDirectory=</varname></entry>
+                  </row>
+                  <row>
+                    <entry><literal>state</literal></entry>
+                    <entry><varname>StateDirectory=</varname></entry>
+                  </row>
+                  <row>
+                    <entry><literal>cache</literal></entry>
+                    <entry><varname>CacheDirectory=</varname></entry>
+                  </row>
+                  <row>
+                    <entry><literal>logs</literal></entry>
+                    <entry><varname>LogsDirectory=</varname></entry>
+                  </row>
+                  <row>
+                    <entry><literal>configuration</literal></entry>
+                    <entry><varname>ConfigurationDirectory=</varname></entry>
+                  </row>
+                  <row>
+                    <entry><literal>fdstore</literal></entry>
+                    <entry><varname>FileDescriptorStorePreserve=</varname></entry>
+                  </row>
+                  <row>
+                    <entry><literal>all</literal></entry>
+                    <entry>All of the above</entry>
+                  </row>
+                </tbody>
+              </tgroup>
+            </table>
+
             <xi:include href="version-info.xml" xpointer="v243"/>
           </listitem>
         </varlistentry>
index 7f85e70d40fc56e2cb50cee6c858310e4bbc588c..f4576c4355b7c4138e872dc7df1d8e4b2e411a45 100644 (file)
@@ -193,7 +193,7 @@ _systemctl () {
                 comps='auto yes no'
                 ;;
             --what)
-                comps='configuration state cache logs runtime all'
+                comps='configuration state cache logs runtime fdstore all'
                 ;;
             --image)
                 comps=$(compgen -A file -- "$cur")