aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Douglas <william.douglas@intel.com>2018-09-10 12:07:29 -0700
committerLennart Poettering <lennart@poettering.net>2018-09-25 23:30:30 +0200
commit6d7b543342ba5e83a3da230200c357430ac0797b (patch)
tree35fde9d1e149f74c413637b7a3866488fe25a26e /man/tmpfiles.d.xml
parentMerge pull request #10169 from poettering/putenv-error-handling (diff)
downloadsystemd-6d7b543342ba5e83a3da230200c357430ac0797b.tar.gz
systemd-6d7b543342ba5e83a3da230200c357430ac0797b.tar.bz2
systemd-6d7b543342ba5e83a3da230200c357430ac0797b.zip
RFC tmpfiles: Allow configuration to ignore execution errors
This is an implementation that covers making errors encountered when writing file content optionally fatal. If this is something that folks would want I'll add handling of this for all the other directives. I'd appreciate suggestions on how this might better be structured as well (use of a goto fail or such) as I'm not super happy with the approach.
Diffstat (limited to 'man/tmpfiles.d.xml')
-rw-r--r--man/tmpfiles.d.xml11
1 files changed, 10 insertions, 1 deletions
diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml
index 9f3660bd4..9907dc6b9 100644
--- a/man/tmpfiles.d.xml
+++ b/man/tmpfiles.d.xml
@@ -116,7 +116,7 @@ L /tmp/foobar - - - - /dev/null</programlisting>
<title>Type</title>
<para>The type consists of a single letter and optionally an
- exclamation mark.</para>
+ exclamation mark and/or minus sign.</para>
<para>The following line types are understood:</para>
@@ -439,6 +439,15 @@ r! /tmp/.X[0-9]*-lock</programlisting>
running system, and will only be executed with
<option>--boot</option>.</para>
+ <para>If the minus sign is used, this line failing to run
+ successfully during create (and only create) will not cause
+ the execution of <command>systemd-tmpfiles</command> to return
+ an error.</para>
+
+ <para>For example:
+ <programlisting># Modify sysfs but don't fail if we are in a container with a read-only /proc
+w- /proc/sys/vm/swappiness - - - - 10</programlisting></para>
+
<para>Note that for all line types that result in creation of any kind of file node
(i.e. <varname>f</varname>/<varname>F</varname>,
<varname>d</varname>/<varname>D</varname>/<varname>v</varname>/<varname>q</varname>/<varname>Q</varname>,