aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-12-04 14:18:41 +0000
committerRoy Marples <roy@marples.name>2007-12-04 14:18:41 +0000
commitba3248e6d23f80f03bed9093891fdfdaf736b2b8 (patch)
treeec25bd56ca659ad25a2b83b3b7a32fb12f24d23d
parentbb2b8f383feb1d1c7d919009f575a6fa0036587d (diff)
Preserve IFS correctly
-rwxr-xr-xsh/net.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/sh/net.sh b/sh/net.sh
index 0a043d43..a39c28bf 100755
--- a/sh/net.sh
+++ b/sh/net.sh
@@ -573,6 +573,8 @@ ${routes}"
hidefirstroute=true
fi
fi
+
+ local OIFS="${IFS}" SIFS=${IFS-y}
local IFS="$__IFS"
for cmd in ${routes}; do
unset IFS
@@ -599,7 +601,11 @@ ${routes}"
eend $?
eoutdent
done
- unset IFS
+ if [ "${SIFS}" = "y" ]; then
+ unset IFS
+ else
+ IFS="${OIFS}"
+ fi
for module in ${MODULES}; do
if type "${module}_post_start" >/dev/null 2>&1; then