From 68f8e8aac289448a31881b81357ea9fb0e8ddde4 Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Thu, 11 Oct 2012 14:34:19 -0400 Subject: 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 --- sh/tmpfiles.sh.in | 4 ++-- 1 file 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() { -- cgit v1.2.3