summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2012-10-11 14:34:19 -0400
committerWilliam Hubbs <w.d.hubbs@gmail.com>2012-10-21 22:37:39 -0500
commit68f8e8aac289448a31881b81357ea9fb0e8ddde4 (patch)
treedbafb7f0b38369505c469c707cbe5d0f013c395f
parentee54bfef057284dc5684a18275fc491741732012 (diff)
downloadopenrc-68f8e8aac289448a31881b81357ea9fb0e8ddde4.tar.gz
openrc-68f8e8aac289448a31881b81357ea9fb0e8ddde4.tar.bz2
openrc-68f8e8aac289448a31881b81357ea9fb0e8ddde4.tar.xz
tmpfiles: return success from _f/_F on empty $arg
'[ -n "$arg" ] && _w' causes _f/_F to return the failure from the test when $arg is empty. Inverting the test causes the test and _f/_F to return success. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
-rwxr-xr-xsh/tmpfiles.sh.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/sh/tmpfiles.sh.in b/sh/tmpfiles.sh.in
index 2486da2..57cedbe 100755
--- a/sh/tmpfiles.sh.in
+++ b/sh/tmpfiles.sh.in
@@ -61,7 +61,7 @@ _f() {
if [ ! -e "$path" ]; then
dryrun_or_real install -m"$mode" -o"$uid" -g"$gid" /dev/null "$path"
- [ -n "$arg" ] && _w "$@"
+ [ -z "$arg" ] || _w "$@"
fi
}
@@ -72,7 +72,7 @@ _F() {
[ $CREATE -gt 0 ] || return 0
dryrun_or_real install -m"$mode" -o"$uid" -g"$gid" /dev/null "$path"
- [ -n "$arg" ] && _w "$@"
+ [ -z "$arg" ] || _w "$@"
}
_d() {