summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Horák <dan@danny.cz>2010-05-19 15:29:28 +0200
committerDan Horák <dan@danny.cz>2010-05-19 15:29:28 +0200
commitbb3567b15f3f18a2cc0c946d19b4891bc7c40955 (patch)
treea194c3ae18494319266d4a1ebc52dcd1cf4021e5
parent557c9386082e01381cbe9dccd6ac495a17901a87 (diff)
downloadutils-bb3567b15f3f18a2cc0c946d19b4891bc7c40955.tar.gz
utils-bb3567b15f3f18a2cc0c946d19b4891bc7c40955.tar.xz
utils-bb3567b15f3f18a2cc0c946d19b4891bc7c40955.zip
make ccw_init compatible with posix shell
-rw-r--r--ccw_init8
1 files changed, 6 insertions, 2 deletions
diff --git a/ccw_init b/ccw_init
index 946dbe9..0d8aaf7 100644
--- a/ccw_init
+++ b/ccw_init
@@ -110,7 +110,12 @@ done
# driver missing or not loaded
[ ! -e $DIR ] && exit 0
-CHANNEL1=${SUBCHANNELS//,*/}
+OLD_IFS="$IFS"
+IFS=","
+set $SUBCHANNELS
+IFS="$OLD_IFS"
+CHANNEL1=$1
+CHANNEL2=$2
SYSDIR="$DIR/$CHANNEL1"
[ -e $SYSDIR ] && exit 0
@@ -123,7 +128,6 @@ fi
DRIVER=$(readlink $DEVPATH/driver)
DRIVER=${DRIVER##*/}
-CHANNEL2=${SUBCHANNELS##*,}
if [ "$DRIVER" = "lcs" -a "$NETTYPE" = "ctc" ]; then
echo "$CHANNEL" > /sys/bus/ccw/drivers/lcs/unbind
echo "$CHANNEL" > /sys/bus/ccw/drivers/ctcm/bind