]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tmpfiles: split out verbs in help
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 4 Dec 2023 11:15:27 +0000 (12:15 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 9 Feb 2024 16:57:41 +0000 (17:57 +0100)
One of the three must always be specified, but they buried in a long list of
options in the output of --help. Make them more visible to draw the eye.

Also, drop "marked" from the description. It's supposed to mean "configured",
but it's a strange way to say that, and also it's generally obvious that the
program does what its configuration tells it to, and it's not going to remove
all files found on the system.

man/systemd-tmpfiles.xml
src/tmpfiles/tmpfiles.c
tools/command_ignorelist

index 3a3924a084f58cba13b1486a6c28c4c5abc2f5df..414d154c421cb2dcc668d5078da460214dafe638 100644 (file)
@@ -23,8 +23,7 @@
     <refname>systemd-tmpfiles-setup-dev.service</refname>
     <refname>systemd-tmpfiles-clean.service</refname>
     <refname>systemd-tmpfiles-clean.timer</refname>
-    <refpurpose>Creates, deletes and cleans up volatile
-    and temporary files and directories</refpurpose>
+    <refpurpose>Create, delete, and clean up files and directories</refpurpose>
   </refnamediv>
 
   <refsynopsisdiv>
@@ -59,7 +58,7 @@
     <para><command>systemd-tmpfiles</command> creates, deletes, and cleans up volatile and temporary files
     and directories, using the configuration file format and location specified in
     <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>. It must
-    be invoked with one or more options <option>--create</option>, <option>--remove</option>, and
+    be invoked with one or more commands <option>--create</option>, <option>--remove</option>, and
     <option>--clean</option>, to select the respective subset of operations.</para>
 
     <para>If invoked with no arguments, directives from the configuration files found in the directories
   </refsect1>
 
   <refsect1>
-    <title>Options</title>
+    <title>Commands and options</title>
 
-    <para>The following options are understood:</para>
+    <para>The following commands are understood:</para>
 
     <variablelist>
       <varlistentry>
         <term><option>--create</option></term>
-        <listitem><para>If this option is passed, all files and
+        <listitem><para>If this command is passed, all files and
         directories marked with
         <varname>f</varname>,
         <varname>F</varname>,
 
       <varlistentry>
         <term><option>--clean</option></term>
-        <listitem><para>If this option is passed, all files and
+        <listitem><para>If this command is passed, all files and
         directories with an age parameter configured will be cleaned
         up.</para></listitem>
       </varlistentry>
 
       <varlistentry>
         <term><option>--remove</option></term>
-        <listitem><para>If this option is passed, the contents of
+        <listitem><para>If this command is passed, the contents of
         directories marked with <varname>D</varname> or
         <varname>R</varname>, and files or directories themselves
         marked with <varname>r</varname> or <varname>R</varname> are
index ff746056af76cdb4ae0669a5499527beee1d9643..5dcdb7e40614195cacd373738fc3aeaf5498cdd4 100644 (file)
@@ -4003,16 +4003,18 @@ static int help(void) {
         if (r < 0)
                 return log_oom();
 
-        printf("%s [OPTIONS...] [CONFIGURATION FILE...]\n"
-               "\n%sCreates, deletes and cleans up volatile and temporary files and directories.%s\n\n"
+        printf("%1$s COMMAND [OPTIONS...] [CONFIGURATION FILE...]\n"
+               "\n%2$sCreate, delete, and clean up files and directories.%4$s\n"
+               "\n%3$sCommands:%4$s\n"
+               "     --create               Create files and directories\n"
+               "     --clean                Clean up files and directories\n"
+               "     --remove               Remove files and directories\n"
                "  -h --help                 Show this help\n"
-               "     --user                 Execute user configuration\n"
                "     --version              Show package version\n"
+               "\n%3$sOptions:%4$s\n"
+               "     --user                 Execute user configuration\n"
                "     --cat-config           Show configuration files\n"
                "     --tldr                 Show non-comment parts of configuration\n"
-               "     --create               Create marked files/directories\n"
-               "     --clean                Clean up marked directories\n"
-               "     --remove               Remove marked files/directories\n"
                "     --boot                 Execute actions only safe at boot\n"
                "     --graceful             Quietly ignore unknown users or groups\n"
                "     --purge                Delete all files owned by the configuration files\n"
@@ -4024,9 +4026,10 @@ static int help(void) {
                "     --image-policy=POLICY  Specify disk image dissection policy\n"
                "     --replace=PATH         Treat arguments as replacement for PATH\n"
                "     --no-pager             Do not pipe output into a pager\n"
-               "\nSee the %s for details.\n",
+               "\nSee the %5$s for details.\n",
                program_invocation_short_name,
                ansi_highlight(),
+               ansi_underline(),
                ansi_normal(),
                link);
 
index 186136dd63936cc53c92a5104958dc388956dbbb..af694c16dbd7990ad91f6da87fd6d1e6325a7c00 100644 (file)
@@ -169,9 +169,9 @@ systemd-nspawn.xml /refsect1[title="Options"]/refsect2[title="Execution Options"
 systemd-nspawn.xml /refsect1[title="Options"]/refsect2[title="System Identity Options"]/variablelist/varlistentry[term="--uuid="]
 systemd-nspawn.xml /refsect1[title="Options"]/refsect2[title="Networking Options"]/variablelist/varlistentry[term="--private-network"]
 systemd-nspawn.xml /refsect1[title="Options"]/refsect2[title="Image Options"]/variablelist/varlistentry[term="--read-only"]
-systemd-tmpfiles.xml /refsect1[title="Options"]/variablelist/varlistentry[term="--create"]
-systemd-tmpfiles.xml /refsect1[title="Options"]/variablelist/varlistentry[term="--clean"]
-systemd-tmpfiles.xml /refsect1[title="Options"]/variablelist/varlistentry[term="--remove"]
+systemd-tmpfiles.xml /refsect1[title="Commands and options"]/variablelist/varlistentry[term="--create"]
+systemd-tmpfiles.xml /refsect1[title="Commands and options"]/variablelist/varlistentry[term="--clean"]
+systemd-tmpfiles.xml /refsect1[title="Commands and options"]/variablelist/varlistentry[term="--remove"]
 systemd-tmpfiles.xml /refsect1[title="Options"]/variablelist/varlistentry[term="--prefix=path"]
 systemd.automount.xml /refsect1[title="Options"]/variablelist/varlistentry[term="Where="]
 systemd.automount.xml /refsect1[title="Options"]/variablelist/varlistentry[term="DirectoryMode="]