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
This commit is contained in:
William Hubbs 2015-10-13 07:59:50 -05:00
parent 850ca03077
commit 29f7e33592

View File

@ -221,16 +221,16 @@ done
# Load our script # Load our script
sourcex "$RC_SERVICE" sourcex "$RC_SERVICE"
for _d in $required_dirs; do eval "printf '%s\n' $required_dirs" | while read _d; do
if [ ! -d $_d ]; then if [ ! -d "$_d" ]; then
eerror "$RC_SVCNAME: \`$_d' is not a directory" eerror "$RC_SVCNAME: \`$_d' is not a directory"
exit 1 exit 1
fi fi
done done
unset _d unset _d
for _f in $required_files; do eval "printf '%s\n' $required_files" | while read _f; do
if [ ! -r $_f ]; then if [ ! -r "$_f" ]; then
eerror "$RC_SVCNAME: \`$_f' is not readable" eerror "$RC_SVCNAME: \`$_f' is not readable"
exit 1 exit 1
fi fi