tmpfiles: run boot-only entries only at boot

A ! after the type marks an entry that is only safe to run at boot.
Finit's own files have them, like this one in x11.conf:

    D! /tmp/.X11-unix 1777 root root

tmpfiles ignored the ! and ran these entries on every call, so this
emptied the directory under a running X server:

    tmpfiles --remove

Only the character right after the type was looked at, and only for
a +.

Read all the modifiers after the type, in any order, and skip an
entry with ! unless the new --boot option is given.  Finit gives it
at boot, together with --remove.  Before this the r, R, and D entries
were never run at boot, so "r! /forcefsck" in legacy.conf left the
file in place.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-11-20 18:02:35 +01:00
1 parent 4a11294f98
commit 3c9500fc08
7 files changed
+108 -34

No files matched your search

+4
View File
@@ -11,6 +11,10 @@ All relevant changes are documented in this file.
- `shutdown` now takes a time, `now`, `+MIN`, or `HH:MM`, and a message.
Finit warns logged-in users as the time approaches, refuses new logins
from five minutes before, and `shutdown -c` cancels. Issue #149
- tmpfiles: entries marked boot-only, with a `!` after the type, are now
skipped unless the new `--boot` option is given. Finit gives it at
boot, and now also `--remove`, so `r`, `R`, and `D` entries take effect
at boot and no longer need a separate call
- tmpfiles: add the `a`, `a+`, `A`, and `A+` entries for POSIX ACLs, used
by for example the tpm2-tss package. Finit sets them itself, no need
for libacl or `setfacl`