Commit Graph
2 Commits
Author SHA1 Message Date
Joachim Wiberg ddb4f18fa9 tmpfiles: add --dry-run, to show what would be run
There was no way to see what the tmpfiles.d files on a system amount
to, short of running them:

    tmpfiles --dry-run --create --remove --boot

With -n or --dry-run each entry that would be run is printed, with
what would be done, remove, clean, or create, in the order it would
be.  Nothing is changed.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-11-20 19:10:04 +01:00
Joachim Wiberg 9195d145d1 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>
2026-11-20 18:02:34 +01:00