diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-01-24 10:54:10 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-01-24 10:54:10 +0100 |
commit | 49e87292dc1fa942928a1e4f10c20b9f830bf2dc (patch) | |
tree | 407ec7b3addfe13dbeb6c1a931ec77349079e4b3 /man/tmpfiles.d.xml | |
parent | Merge pull request #7979 from yuwata/unused-variables (diff) | |
download | systemd-49e87292dc1fa942928a1e4f10c20b9f830bf2dc.tar.xz systemd-49e87292dc1fa942928a1e4f10c20b9f830bf2dc.zip |
tmpfiles: make "f" lines behaviour match what the documentation says
CHANGE OF BEHAVIOUR — with this commit "f" line's behaviour is altered
to match what the documentation says: if an "argument" string is
specified it is written to the file only when the file didn't exist
before. Previously, it would be appended to the file each time
systemd-tmpfiles was invoked — which is not a particularly useful
behaviour as the tool is not idempotent then and the indicated files
grow without bounds each time the tool is invoked.
I did some spelunking whether this change in behaviour would break
things, but afaics nothing relies on the previous O_APPEND behaviour of
this line type, hence I think it's relatively safe to make "f" lines
work the way the docs say, rather than adding a new modifier for it or
so.
Triggered by:
https://lists.freedesktop.org/archives/systemd-devel/2018-January/040171.html
Diffstat (limited to 'man/tmpfiles.d.xml')
-rw-r--r-- | man/tmpfiles.d.xml | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml index 30aa886388..c3a43d36e4 100644 --- a/man/tmpfiles.d.xml +++ b/man/tmpfiles.d.xml @@ -147,9 +147,8 @@ L /tmp/foobar - - - - /dev/null</programlisting> <variablelist> <varlistentry> <term><varname>f</varname></term> - <listitem><para>Create a file if it does not exist yet. If - the argument parameter is given, it will be written to the - file. Does not follow symlinks.</para></listitem> + <listitem><para>Create a file if it does not exist yet. If the argument parameter is given and the file did + not exist yet, it will be written to the file. Does not follow symlinks.</para></listitem> </varlistentry> <varlistentry> @@ -585,21 +584,14 @@ r! /tmp/.X[0-9]*-lock</programlisting> <refsect2> <title>Argument</title> - <para>For <varname>L</varname> lines determines the destination - path of the symlink. For <varname>c</varname> and - <varname>b</varname>, determines the major/minor of the device - node, with major and minor formatted as integers, separated by - <literal>:</literal>, e.g. <literal>1:3</literal>. For - <varname>f</varname>, <varname>F</varname>, and - <varname>w</varname>, the argument may be used to specify a short string that - is written to the file, suffixed by a newline. For - <varname>C</varname>, specifies the source file or - directory. For <varname>t</varname> and <varname>T</varname>, - determines extended attributes to be set. For - <varname>a</varname> and <varname>A</varname>, determines ACL - attributes to be set. For <varname>h</varname> and - <varname>H</varname>, determines the file attributes to - set. Ignored for all other lines.</para> + <para>For <varname>L</varname> lines determines the destination path of the symlink. For <varname>c</varname> and + <varname>b</varname>, determines the major/minor of the device node, with major and minor formatted as integers, + separated by <literal>:</literal>, e.g. <literal>1:3</literal>. For <varname>f</varname>, <varname>F</varname>, + and <varname>w</varname>, the argument may be used to specify a short string that is written to the file, + suffixed by a newline. For <varname>C</varname>, specifies the source file or directory. For <varname>t</varname> + and <varname>T</varname>, determines extended attributes to be set. For <varname>a</varname> and + <varname>A</varname>, determines ACL attributes to be set. For <varname>h</varname> and <varname>H</varname>, + determines the file attributes to set. Ignored for all other lines.</para> <para>This field can contain specifiers, see below.</para> </refsect2> |