From 4b599b2266a806665d08fca816e43e3587fc26ba Mon Sep 17 00:00:00 2001 From: Dan HorĂ¡k Date: Wed, 5 May 2010 10:38:44 +0200 Subject: replace seq with a while cycle Cecause the seq utility lives in /usr/bin and the script must be runnable without the /usr filesystem mounted, it's replaced by a while cycle. --- device_cio_free | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/device_cio_free b/device_cio_free index 80e9451..7aed42b 100644 --- a/device_cio_free +++ b/device_cio_free @@ -14,7 +14,7 @@ # # also processes the system ccw config file and network interface configurations # -# requires: echo, sleep, modprobe, grep, printf, seq. +# requires: echo, sleep, modprobe, grep, printf. # # it is used in # anaconda @@ -132,18 +132,24 @@ wait_on_devices() IFS=$OLD_IFS # iterate thru all devices - for i in $(seq $L0 $U0); do + i=$L0 + while [ $i -le $U0 ]; do [ $i -eq $L0 ] && LJ=$L1 || LJ=0 [ $i -eq $U0 ] && UJ=$U1 || UJ=3 - for j in $(seq $LJ $UJ); do + j=$LJ + while [ $j -le $UJ ]; do [ $i -eq $L0 -a $j -eq $L1 ] && LK=$L2 || LK=0 [ $i -eq $U0 -a $j -eq $U1 ] && UK=$U2 || UK=65535 - for k in $(seq $LK $UK); do + k=$LK + while [ $k -le $UK ]; do wait_on_single_device "$(printf %x.%x.%04x $i $j $k)" + k=$(($k + 1)) done + j=$(($j + 1)) done + i=$(($i + 1)) done done } -- cgit