save and restore IFS correctly
X-Gentoo-Bug: 371141 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=371141
This commit is contained in:
parent
fe6cd23287
commit
0c7032840b
@ -37,16 +37,10 @@ stop()
|
|||||||
local x= no_umounts_r="/|/dev|/dev/.*|${RC_SVCDIR}"
|
local x= no_umounts_r="/|/dev|/dev/.*|${RC_SVCDIR}"
|
||||||
no_umounts_r="${no_umounts_r}|/bin|/sbin|/lib|/libexec"
|
no_umounts_r="${no_umounts_r}|/bin|/sbin|/lib|/libexec"
|
||||||
# RC_NO_UMOUNTS is an env var that can be set by plugins
|
# RC_NO_UMOUNTS is an env var that can be set by plugins
|
||||||
local OIFS=$IFS SIFS=${IFS-y}
|
local IFS="$IFS:"
|
||||||
IFS=$IFS:
|
|
||||||
for x in $no_umounts $RC_NO_UMOUNTS; do
|
for x in $no_umounts $RC_NO_UMOUNTS; do
|
||||||
no_umounts_r="$no_umounts_r|$x"
|
no_umounts_r="$no_umounts_r|$x"
|
||||||
done
|
done
|
||||||
if [ "$SIFS" = y ]; then
|
|
||||||
IFS=$OIFS
|
|
||||||
else
|
|
||||||
unset IFS
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$RC_UNAME" = Linux ]; then
|
if [ "$RC_UNAME" = Linux ]; then
|
||||||
no_umounts_r="$no_umounts_r|/proc|/proc/.*|/run|/sys|/sys/.*"
|
no_umounts_r="$no_umounts_r|/proc|/proc/.*|/run|/sys|/sys/.*"
|
||||||
|
@ -22,16 +22,10 @@ start()
|
|||||||
local m="/dev|/dev/.*|/proc|/proc.*|/sys|/sys/.*|${RC_SVCDIR}" x= fs=
|
local m="/dev|/dev/.*|/proc|/proc.*|/sys|/sys/.*|${RC_SVCDIR}" x= fs=
|
||||||
m="$m|/bin|/sbin|/lib|/libexec"
|
m="$m|/bin|/sbin|/lib|/libexec"
|
||||||
# RC_NO_UMOUNTS is an env var that can be set by plugins
|
# RC_NO_UMOUNTS is an env var that can be set by plugins
|
||||||
local OIFS=$IFS SIFS=${IFS-y} IFS=$IFS
|
local IFS="$IFS:"
|
||||||
IFS=$IFS:
|
|
||||||
for x in $no_umounts $RC_NO_UMOUNTS; do
|
for x in $no_umounts $RC_NO_UMOUNTS; do
|
||||||
m="$m|$x"
|
m="$m|$x"
|
||||||
done
|
done
|
||||||
if [ "$SIFS" = y ]; then
|
|
||||||
IFS=$OIFS
|
|
||||||
else
|
|
||||||
unset IFS
|
|
||||||
fi
|
|
||||||
m="^($m)$"
|
m="^($m)$"
|
||||||
fs=
|
fs=
|
||||||
for x in $net_fs_list $extra_net_fs_list; do
|
for x in $net_fs_list $extra_net_fs_list; do
|
||||||
|
Loading…
Reference in New Issue
Block a user