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

Fix up minor bug in argument processing.

parent 1aaf3599
......@@ -56,7 +56,7 @@ $| = 1; #Turn off line buffering on output
if (! getopts($optlist, \%options)) {
usage();
}
if (@ARGV != 2) {
if (@ARGV < 2) {
usage();
}
if (defined($options{"s"})) {
......@@ -235,16 +235,14 @@ foreach my $node (@nodes) {
if ($sth == 0) {
die("Database update failed (nodes next_boot). Aborted ...");
}
}
#
# Fire off a reboot.
#
if (! $setuponly) {
if (system("$nodereboot $pc")) {
print STDERR "Node $pc could not be rebooted!\n";
$failures++;
}
}
#
# Fire off a reboot.
#
if (! $setuponly) {
system("$nodereboot @nodes");
$failures = $? >> 8;
}
print STDOUT "OS Reload Done!\n";
......
......@@ -47,7 +47,7 @@ $| = 1; #Turn off line buffering on output
if (! getopts($optlist, \%options)) {
usage();
}
if (@ARGV != 2) {
if (@ARGV < 2) {
usage();
}
if (defined($options{"f"})) {
......
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