From c46c32338580eee3446b7caa57883db3a8bb9010 Mon Sep 17 00:00:00 2001 From: Allen Webb Date: Tue, 30 Mar 2021 09:37:11 -0500 Subject: 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 --- man/tmpfiles.d.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'man') 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 Type The type consists of a single letter and optionally an exclamation mark (!) - and/or minus sign (-). + minus sign (-), and/or equals sign (=). The following line types are understood: @@ -482,6 +482,11 @@ r! /tmp/.X[0-9]*-lock # Modify sysfs but don't fail if we are in a container with a read-only /proc w- /proc/sys/vm/swappiness - - - - 10 + If the equals sign (=) 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. + Note that for all line types that result in creation of any kind of file node (i.e. f/F, d/D/v/q/Q, -- cgit v1.2.1