mirror of
https://github.com/troglobit/finit.git
synced 2026-11-23 20:11:44 +00:00
tmpfiles: take --graceful
Package scripts written for systemd-tmpfiles may call it with
--graceful, to not fail on an entry for a user or group that does not
exist. tmpfiles then stops at the unknown option and prints its usage
text:
tmpfiles --create --graceful /usr/lib/tmpfiles.d/foo.conf
Take the option and do nothing. An entry with an unknown user is
already skipped without an error, and an unknown group left alone.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
4 files changed
+14
-1
No files matched your search
@@ -121,3 +121,8 @@ assert "Skipped when not Base64" "$(texec sh -c "ls $DIR | grep -c b64bad")" = "
|
||||
sep
|
||||
say '--cat-config shows the files that would be read'
|
||||
assert "Files with their name" "$(texec /libexec/finit/tmpfiles --cat-config $CONF | head -2 | tr '\n' ' ')" = "# $CONF f~ /tmp/arg/b64 - - - - aGVsbG8gJXQK "
|
||||
|
||||
sep
|
||||
say '--graceful is taken, and changes nothing'
|
||||
run "rm $DIR/b64; /libexec/finit/tmpfiles --create --graceful $CONF"
|
||||
assert "Runs with --graceful" "$(texec cat $DIR/b64)" = "hello %t"
|
||||
Reference in new issue
Block a user