summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Horák <dan@danny.cz>2010-05-19 15:31:15 +0200
committerDan Horák <dan@danny.cz>2010-05-19 15:31:15 +0200
commitd18d38bf7dee09b900ec015ca6248829b1a2b6c2 (patch)
treecbcb6b4b2b91110921f6aa554326414e52879b79
parentbb3567b15f3f18a2cc0c946d19b4891bc7c40955 (diff)
downloadutils-d18d38bf7dee09b900ec015ca6248829b1a2b6c2.tar.gz
utils-d18d38bf7dee09b900ec015ca6248829b1a2b6c2.tar.xz
utils-d18d38bf7dee09b900ec015ca6248829b1a2b6c2.zip
save the IFS variable only once at the beginning
-rw-r--r--ccw_init4
1 files changed, 1 insertions, 3 deletions
diff --git a/ccw_init b/ccw_init
index 0d8aaf7..8eabbe2 100644
--- a/ccw_init
+++ b/ccw_init
@@ -4,13 +4,13 @@
[ "$SUBSYSTEM" != "ccw" ] && exit 0
[ -e /etc/ccw.conf ] && MODE="dracut" || MODE="normal"
+OLD_IFS="$IFS"
get_config_line_by_subchannel()
{
local CHANNEL
CHANNEL="$1"
while read line; do
- OLD_IFS="$IFS"
IFS=","
set $line
IFS="$OLD_IFS"
@@ -31,7 +31,6 @@ if [ $MODE = "dracut" ]; then
[ $? -ne 0 -o -z "$CONFIG_LINE" ] && break
- OLD_IFS="$IFS"
IFS=","
set $CONFIG_LINE
IFS="$OLD_IFS"
@@ -110,7 +109,6 @@ done
# driver missing or not loaded
[ ! -e $DIR ] && exit 0
-OLD_IFS="$IFS"
IFS=","
set $SUBCHANNELS
IFS="$OLD_IFS"