summaryrefslogtreecommitdiff
path: root/sh
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 19:49:42 -0500
commit5647946e61380c9f917828440d4c6e5bd8796f56 (patch)
treec276ad79dcaccf272a8e823c1efae5f93a1118fd /sh
parent74c6b554bcdbed5e41c9d6dde16bf636bfa8a758 (diff)
downloadopenrc-5647946e61380c9f917828440d4c6e5bd8796f56.tar.gz
openrc-5647946e61380c9f917828440d4c6e5bd8796f56.tar.bz2
openrc-5647946e61380c9f917828440d4c6e5bd8796f56.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>
Diffstat (limited to 'sh')
-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() {