tmpfiles: read a file named - from standard input

A package script that has its entries at hand, and not yet in a file,
gives them to systemd-tmpfiles on standard input:

    echo 'd /var/lib/app 0750 app app' | tmpfiles --create -

Finit's tmpfiles took - as the name of a file and failed to open it.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-11-21 19:23:49 +01:00
1 parent dd186287d7
commit fa430d0a02
3 files changed
+19 -10

No files matched your search

+2
View File
@@ -59,6 +59,8 @@ All relevant changes are documented in this file.
change an entry from a file in `/usr/lib/tmpfiles.d`, use a file of the
same name in `/etc/tmpfiles.d`, or one with a name that sorts before it.
`tmpfiles --dry-run` tells which entries are skipped
- tmpfiles: a file named `-` on the command line is read from standard
input
- tmpfiles: add `--prefix=PATH`, to only run the entries for paths below
it. `--prefix` and `--exclude-prefix` match whole path components,
`--exclude-prefix=/dev` no longer skips `/devices`