From c8703354e36d85468e4b336371be424b76a68726 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Thu, 16 Aug 2012 18:44:47 +0000 Subject: sh/tmpfiles: fix quoting for optional arguments Some optional arguments were missing quotes in the tests, so produced spurious warnings. Signed-off-by: Robin H. Johnson --- sh/tmpfiles.sh.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sh') diff --git a/sh/tmpfiles.sh.in b/sh/tmpfiles.sh.in index de81964..1460bdf 100755 --- a/sh/tmpfiles.sh.in +++ b/sh/tmpfiles.sh.in @@ -268,10 +268,10 @@ for FILE in $tmpfiles_d ; do age=$6 arg=$7 - [ ${4} = '-' ] && uid=0 - [ ${5} = '-' ] && gid=0 - [ ${6} = '-' ] && age=0 - [ ${7} = '-' ] && arg='' + [ "${4}" = '-' -o "${4}" = '' ] && uid=0 + [ "${5}" = '-' -o "${5}" = '' ] && gid=0 + [ "${6}" = '-' -o "${6}" = '' ] && age=0 + [ "${7}" = '-' -o "${7}" = '' ] && arg='' set -- "$path" "$mode" "$uid" "$gid" "$age" "$arg" [ "$VERBOSE" -eq "1" ] && echo _$cmd "$@" -- cgit v1.2.3