Commit 893a917f authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Change call to rpc27ctrl so that it uses the return value properly;

it returns 0 on success and non-zero on failure.
parent 8880cdda
......@@ -231,8 +231,11 @@ foreach $node ( sort @machines) {
print "\n";
} elsif ($type eq "RPC27") {
if (rpc27ctrl($op,$powerID{$node},$OutletList{$node})) {
print "Control of $node failed.\n"; $exitval++;
}
else {
print "$node now ",($op eq "cycle" ? "reboot" : $op),"\n";
} else { print "Control of $node failed.\n"; $exitval++; }
}
} else {
print "power: Unknown power type '$type'\n";
$exitval++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment