From d18d38bf7dee09b900ec015ca6248829b1a2b6c2 Mon Sep 17 00:00:00 2001 From: Dan HorĂ¡k Date: Wed, 19 May 2010 15:31:15 +0200 Subject: save the IFS variable only once at the beginning --- ccw_init | 4 +--- 1 file changed, 1 insertion(+), 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" -- cgit