add the waiting time for startsrc/stopsrc command
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5578 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
4220d5b9af
commit
f810d023dd
@ -32,10 +32,13 @@ use xCAT::Utils;
|
||||
#-----------------------------------------------------------------------------
|
||||
# Main
|
||||
|
||||
$::RE_CHECK_NUM = 10; # the times to check the result of command, the checking interval is 1 second
|
||||
|
||||
my $rc;
|
||||
my @output;
|
||||
my $inoperative = 0;
|
||||
my $check_num;
|
||||
|
||||
my $cmd = basename($0);
|
||||
# for auditing
|
||||
my $current_userid = getpwuid($>);
|
||||
@ -82,7 +85,7 @@ if (! $inoperative) { # active
|
||||
}
|
||||
|
||||
# Wait for end of the xcatd subsystem
|
||||
$check_num = 5;
|
||||
$check_num = $::RE_CHECK_NUM;
|
||||
while ($check_num > 0) {
|
||||
$cmd = "lssrc -s xcatd | grep 'xcatd' | grep 'inoperative'";
|
||||
@output = `$cmd`;
|
||||
@ -125,7 +128,7 @@ if (scalar(@output)) {
|
||||
my $cmd = "/usr/bin/kill -9 $pid >/dev/null 2>&1";
|
||||
`$cmd`;
|
||||
}
|
||||
$check_num = 5;
|
||||
$check_num = $::RE_CHECK_NUM;
|
||||
while ($check_num > 0) {
|
||||
$cmd = "ps -ef | grep xcatd: | grep -v grep";
|
||||
@output = `$cmd`;
|
||||
@ -167,7 +170,7 @@ if ($rc >> 8) {
|
||||
sleep 3;
|
||||
|
||||
# Check the status of xcatd subsystem
|
||||
$check_num = 5;
|
||||
$check_num = $::RE_CHECK_NUM;
|
||||
while ($check_num > 0) {
|
||||
$cmd = "lssrc -s xcatd | grep 'xcatd' | grep 'active'";
|
||||
my @output = `$cmd`;
|
||||
|
Loading…
Reference in New Issue
Block a user