aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2015-10-13 07:59:50 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2015-10-13 07:59:50 -0500
commit29f7e335927d4c1fb151124de8cdf01fb87723fa (patch)
tree66d1886741407f529b5e80d15fcda79a5662d664 /sh
parent850ca030777cb0c3e2fb03d9ab1f0ccee7b89e93 (diff)
openrc-run.sh: allow spaces in required_{files,dirs}
X-Gentoo-Bug: 562320 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=562320
Diffstat (limited to 'sh')
-rw-r--r--sh/openrc-run.sh.in8
1 files changed, 4 insertions, 4 deletions
diff --git a/sh/openrc-run.sh.in b/sh/openrc-run.sh.in
index 33dc59c5..e9369e44 100644
--- a/sh/openrc-run.sh.in
+++ b/sh/openrc-run.sh.in
@@ -221,16 +221,16 @@ done
# Load our script
sourcex "$RC_SERVICE"
-for _d in $required_dirs; do
- if [ ! -d $_d ]; then
+eval "printf '%s\n' $required_dirs" | while read _d; do
+ if [ ! -d "$_d" ]; then
eerror "$RC_SVCNAME: \`$_d' is not a directory"
exit 1
fi
done
unset _d
-for _f in $required_files; do
- if [ ! -r $_f ]; then
+eval "printf '%s\n' $required_files" | while read _f; do
+ if [ ! -r "$_f" ]; then
eerror "$RC_SVCNAME: \`$_f' is not readable"
exit 1
fi