init: drop GNU-isms for sleep command
authorDoug Goldstein <cardoe@cardoe.com>
Thu, 5 May 2016 20:18:08 +0000 (15:18 -0500)
committerWei Liu <wei.liu2@citrix.com>
Fri, 6 May 2016 11:00:22 +0000 (12:00 +0100)
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>
tools/hotplug/Linux/block-iscsi
tools/hotplug/Linux/init.d/xencommons.in
tools/hotplug/Linux/init.d/xendriverdomain.in

index 8e36852832acaa99716527a1fa79c7d4b4b63daf..3615905252d1c56d4990ce94297cb8fe6379dfc6 100644 (file)
@@ -74,7 +74,7 @@ find_device()
 {
     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
index 21e913378e35f6da1abbd389ec1d44ebc2dd6881..eeac8ab74a4eb9c952b5f3194b187617bd98e1a2 100644 (file)
@@ -107,14 +107,14 @@ do_stop () {
         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
 
index dd5f3a3f53d4fa17475c2239dab0c221b184d29b..3720dea57a73764b32bff57ca3cae9130cfd63d7 100644 (file)
@@ -56,7 +56,7 @@ do_stop () {
         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
 }