Line 274... |
Line 274... |
274 |
# on $scanNode, grep'ing for $scanDomain
|
274 |
# on $scanNode, grep'ing for $scanDomain
|
275 |
# $condition is 1, to wait for domain to start
|
275 |
# $condition is 1, to wait for domain to start
|
276 |
# or 0 (false) to wait for it to shut down
|
276 |
# or 0 (false) to wait for it to shut down
|
277 |
sub executeAndWait {
|
277 |
sub executeAndWait {
|
278 |
my ( $command, $scanNode, $scanDomain, $condition ) = @_;
|
278 |
my ( $command, $scanNode, $scanDomain, $condition ) = @_;
|
279 |
my $waitSeconds = 5; # number of seconds to wait before checking again
|
279 |
my $waitSeconds = 15; # number of seconds to wait before checking again
|
280 |
my $maxIterations = 60 / $waitSeconds; # maximum number of tries
|
280 |
my $maxIterations = 60 / $waitSeconds; # maximum number of tries
|
281 |
print "Running [$command], then waiting $waitSeconds to check if complete\n" if $main::config->{'flags'}->{'debug'};
|
281 |
print "Running [$command], then waiting $waitSeconds to check if complete\n" if $main::config->{'flags'}->{'debug'};
|
282 |
`$command`;
|
282 |
`$command`;
|
283 |
my $waitCommand = &makeCommand( $scanNode, "virsh list | grep $scanDomain" );
|
283 |
my $waitCommand = &makeCommand( $scanNode, "virsh list | grep $scanDomain" );
|
284 |
my $output = '';
|
284 |
my $output = '';
|