Most implementations of the sleep command only take integers. GNU
coreutils has a GNU extension to allow any floating point number to be
passed but we shouldn't depend on that.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
{
count=0
while [ ! -e /dev/disk/by-path/*"$iqn"-lun-0 ]; do
- sleep 0.1
+ sleep 1
count=`expr $count + 1`
if [ count = 100 ]; then
# 10s timeout while waiting for iSCSI disk to settle
echo Stopping xenconsoled
if read 2>/dev/null <$XENCONSOLED_PIDFILE pid; then
kill $pid
- while kill -9 $pid >/dev/null 2>&1; do sleep 0.1; done
+ while kill -9 $pid >/dev/null 2>&1; do sleep 1; done
rm -f $XENCONSOLED_PIDFILE
fi
echo Stopping QEMU
if read 2>/dev/null <$QEMU_PIDFILE pid; then
kill $pid
- while kill -9 $pid >/dev/null 2>&1; do sleep 0.1; done
+ while kill -9 $pid >/dev/null 2>&1; do sleep 1; done
rm -f $QEMU_PIDFILE
fi
echo Stopping xl devd...
if read 2>/dev/null <$XLDEVD_PIDFILE pid; then
kill $pid
- while kill -9 $pid >/dev/null 2>&1; do sleep 0.1; done
+ while kill -9 $pid >/dev/null 2>&1; do sleep 1; done
rm -f $XLDEVD_PIDFILE
fi
}