summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2012-08-16 18:44:47 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2012-08-16 18:45:23 +0000
commitc8703354e36d85468e4b336371be424b76a68726 (patch)
tree60c50de2a68eb6c28ab16f3c8e5f35216c243a36 /sh
parente641b4384977011b93c3c2a90222d459bc4c5ca6 (diff)
downloadopenrc-c8703354e36d85468e4b336371be424b76a68726.tar.gz
openrc-c8703354e36d85468e4b336371be424b76a68726.tar.bz2
openrc-c8703354e36d85468e4b336371be424b76a68726.tar.xz
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 <robbat2@gentoo.org>
Diffstat (limited to 'sh')
-rwxr-xr-xsh/tmpfiles.sh.in8
1 files changed, 4 insertions, 4 deletions
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 "$@"