mirror of
https://github.com/troglobit/finit.git
synced 2026-11-23 20:11:44 +00:00
tmpfiles: skip an entry with a relative path
An entry with a path like tmp/file was run on the directory tmpfiles happened to be started in. tmpfiles.d(5) only has absolute paths, and systemd skips such a line. Do the same, with a warning. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
4 files changed
+12
-4
No files matched your search
@@ -95,13 +95,15 @@ f '/tmp/arg/single quote' - - - - single
|
||||
f /tmp/arg/mid"dle sp"ace - - - - middle
|
||||
f /tmp/arg/esc\x41\sped - - - - "kept as is"
|
||||
f "/tmp/arg/open - - - - quote
|
||||
f tmp/arg/relative - - - - path
|
||||
CONF
|
||||
run "/libexec/finit/tmpfiles --create $CONF"
|
||||
run "cd /; /libexec/finit/tmpfiles --create $CONF"
|
||||
assert "Double quotes" "$(texec cat "$DIR/with space")" = "double"
|
||||
assert "Single quotes" "$(texec cat "$DIR/single quote")" = "single"
|
||||
assert "Quotes in path" "$(texec cat "$DIR/middle space")" = "middle"
|
||||
assert "Escapes in path" "$(texec cat "$DIR/escA ped")" = '"kept as is"'
|
||||
assert "Skipped with a quote left open" "$(texec sh -c "ls $DIR | grep -c open")" = "0"
|
||||
assert "Skipped when not absolute" "$(texec sh -c "ls $DIR | grep -c relative")" = "0"
|
||||
|
||||
sep
|
||||
say 'With ~ the argument is Base64'
|
||||
|
||||
Reference in new issue
Block a user