summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2023-12-04 12:15:27 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2024-02-09 17:57:41 +0100
commit9c8a0ca69e9270c5446400135e29c99d85e68048 (patch)
tree39f0e24de8e1e0ad9f0d502bcec34a0bf434d93d
parenttree-wide: use normal spelling of "reopen" (diff)
downloadsystemd-9c8a0ca69e9270c5446400135e29c99d85e68048.tar.xz
systemd-9c8a0ca69e9270c5446400135e29c99d85e68048.zip
tmpfiles: split out verbs in help
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.
-rw-r--r--man/systemd-tmpfiles.xml15
-rw-r--r--src/tmpfiles/tmpfiles.c17
-rw-r--r--tools/command_ignorelist6
3 files changed, 20 insertions, 18 deletions
diff --git a/man/systemd-tmpfiles.xml b/man/systemd-tmpfiles.xml
index 3a3924a084..414d154c42 100644
--- a/man/systemd-tmpfiles.xml
+++ b/man/systemd-tmpfiles.xml
@@ -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
@@ -99,14 +98,14 @@
</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>,
@@ -132,14 +131,14 @@
<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
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index ff746056af..5dcdb7e406 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -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);
diff --git a/tools/command_ignorelist b/tools/command_ignorelist
index 186136dd63..af694c16db 100644
--- a/tools/command_ignorelist
+++ b/tools/command_ignorelist
@@ -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="]