Skip to content

Commit

Permalink
Merge pull request #1240 from daniceexi/xcatd_stop
Browse files Browse the repository at this point in the history
issue 1137: waiting longer for stopping xcatd when the system load of…
  • Loading branch information
chenglch committed Jun 1, 2016
2 parents 6824226 + d9519b6 commit 2794ca5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions xCAT-server/etc/init.d/xcatd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2794ca5

Please sign in to comment.