tmpfiles: remove before creating when asked to do both

With both --create and --remove each entry was removed and then
created before the next one was read.  An r entry took what an entry
above it had just created:

    f /tmp/file - - - - new
    r /tmp/file

    tmpfiles --create --remove t.conf

This left no /tmp/file.  The same goes for --clean.

Run all the files twice in that case, first to remove and clean, then
to create.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-11-20 18:02:34 +01:00
1 parent 3a283d40b5
commit 9195d145d1
4 files changed
+95 -51

No files matched your search

+2
View File
@@ -84,6 +84,7 @@ EXTRA_DIST += testserv.sh
EXTRA_DIST += tmpfiles-acl.sh
EXTRA_DIST += tmpfiles-arg.sh
EXTRA_DIST += tmpfiles-perm.sh
EXTRA_DIST += tmpfiles-order.sh
EXTRA_DIST += unexpected-restart.sh
EXTRA_DIST += dbus-auth.sh
EXTRA_DIST += dbus-authz.sh
@@ -164,6 +165,7 @@ TESTS += testserv.sh
TESTS += tmpfiles-acl.sh
TESTS += tmpfiles-arg.sh
TESTS += tmpfiles-perm.sh
TESTS += tmpfiles-order.sh
endif
TESTS += unexpected-restart.sh
if DBUS