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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2023-12-04 12:15:27 +01:00
parent f7862b2a00
commit 9c8a0ca69e
3 changed files with 20 additions and 18 deletions

View 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
@@ -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

View 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);

View 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="]