diff --git a/xCAT-server/etc/init.d/xcatd b/xCAT-server/etc/init.d/xcatd index c9b2ef45c..1334c0ac2 100755 --- a/xCAT-server/etc/init.d/xcatd +++ b/xCAT-server/etc/init.d/xcatd @@ -103,15 +103,21 @@ stop) fi kill -TERM -`cat /var/run/xcatd.pid` i=0; - while $STATUS > /dev/null 2>&1 && [ $i -lt 15 ]; do + while $STATUS > /dev/null 2>&1 && [ $i -lt 30 ]; do sleep .1 i=$((i+1)) done $STATUS > /dev/null 2>&1 + if [ "$?" = "0" ]; then kill -KILL -`cat /var/run/xcatd.pid` + i=0 + while $STATUS > /dev/null 2>&1 && [ $i -lt 30 ]; do + sleep .1 + i=$((i+1)) + done fi - sleep .1 + $STATUS > /dev/null 2>&1 if [ "$?" = "0" ]; then $LOG_FAILURE