summaryrefslogtreecommitdiff
path: root/man/tmpfiles.d.xml
diff options
context:
space:
mode:
authorAllen Webb <allenwebb@google.com>2021-03-30 09:37:11 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-06-08 17:23:26 +0200
commitc46c32338580eee3446b7caa57883db3a8bb9010 (patch)
tree8882061bc4685ba8d852b53bb7f44b42dee9302f /man/tmpfiles.d.xml
parent90a404f5d490eb4981851966f6a01f210fd5eb0d (diff)
downloadsystemd-c46c32338580eee3446b7caa57883db3a8bb9010.tar.gz
tmpfiles: add '=' action modifier.
Add the '=' action modifier that instructs tmpfiles.d to check the file type of a path and remove objects that do not match before trying to open or create the path. BUG=chromium:1186405 TEST=./test/test-systemd-tmpfiles.py "$(which systemd-tmpfiles)" Change-Id: If807dc0db427393e9e0047aba640d0d114897c26
Diffstat (limited to 'man/tmpfiles.d.xml')
-rw-r--r--man/tmpfiles.d.xml7
1 files changed, 6 insertions, 1 deletions
diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml
index 35b762ca3f..e7a87c5839 100644
--- a/man/tmpfiles.d.xml
+++ b/man/tmpfiles.d.xml
@@ -161,7 +161,7 @@ L /tmp/foobar - - - - /dev/null</programlisting>
<title>Type</title>
<para>The type consists of a single letter and optionally an exclamation mark (<literal>!</literal>)
- and/or minus sign (<literal>-</literal>).</para>
+ minus sign (<literal>-</literal>), and/or equals sign (<literal>=</literal>).</para>
<para>The following line types are understood:</para>
@@ -482,6 +482,11 @@ r! /tmp/.X[0-9]*-lock</programlisting>
<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>If the equals sign (<literal>=</literal>) is used, the file types of existing objects in the specified path
+ are checked, and removed if they do not match. This includes any implicitly created parent directories (which can
+ be either directories or directory symlinks). For example, if there is a FIFO in place of one of the parent path
+ components it will be replaced with a directory.</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>,