From 33cc84a9cda85d3ed0cbf06feb8c07960b437328 Mon Sep 17 00:00:00 2001 From: Kirill Elagin Date: Sat, 11 Jun 2011 16:10:19 +0400 Subject: Fix misuse of $IFS --- init.d/localmount.in | 8 ++++---- init.d/mount-ro.in | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/init.d/localmount.in b/init.d/localmount.in index b4f7346..33c1c31 100644 --- a/init.d/localmount.in +++ b/init.d/localmount.in @@ -37,15 +37,15 @@ stop() local x= no_umounts_r="/|/dev|/dev/.*|${RC_SVCDIR}" no_umounts_r="${no_umounts_r}|/bin|/sbin|/lib|/libexec" # RC_NO_UMOUNTS is an env var that can be set by plugins - OIFS=$IFS SIFS=${IFS-y} + local OIFS=$IFS SIFS=${IFS-n} IFS=$IFS: for x in $no_umounts $RC_NO_UMOUNTS; do no_umounts_r="$no_umounts_r|$x" done - if [ "$SIFS" = y ]; then - IFS=$OIFS - else + if [ "$SIFS" = n ]; then unset IFS + else + IFS=$OIFS fi if [ "$RC_UNAME" = Linux ]; then diff --git a/init.d/mount-ro.in b/init.d/mount-ro.in index 69032d7..9eebb6c 100644 --- a/init.d/mount-ro.in +++ b/init.d/mount-ro.in @@ -22,15 +22,15 @@ start() local m="/dev|/dev/.*|/proc|/proc.*|/sys|/sys/.*|${RC_SVCDIR}" x= fs= m="$m|/bin|/sbin|/lib|/libexec" # RC_NO_UMOUNTS is an env var that can be set by plugins - local OIFS=$IFS SIFS=${IFS-y} IFS=$IFS + local OIFS=$IFS SIFS=${IFS-n} IFS=$IFS: for x in $no_umounts $RC_NO_UMOUNTS; do m="$m|$x" done - if [ "$SIFS" = y ]; then - IFS=$OIFS - else + if [ "$SIFS" = n ]; then unset IFS + else + IFS=$OIFS fi m="^($m)$" fs= -- 1.7.3.4