Commit abfbb5d7 authored by Mike Hibler's avatar Mike Hibler

Wee little hack:

 Common mistake: forget the -i before the imagename, e.g.,
 "os_load FBSD54-STD pcNN", which results in pcNN getting loaded
 with the default image.  So if the first arg fails as a node, but
 is an image ID, assume they have made this mistake and stop.
parent bbd1834a
...@@ -206,13 +206,27 @@ if (defined($options{"m"})) { ...@@ -206,13 +206,27 @@ if (defined($options{"m"})) {
# #
# Weed out non-imageable nodes (e.g., virtnodes, emotes, etc.) # Weed out non-imageable nodes (e.g., virtnodes, emotes, etc.)
# #
my $first = 1;
my @temp = (); my @temp = ();
foreach my $node ( @nodes ) { foreach my $node ( @nodes ) {
if (!TBIsNodeImageable($node)) { if (!TBIsNodeImageable($node)) {
#
# Common mistake: forget the -i before the imagename, e.g.,
# "os_load FBSD54-STD pcNN", which results in pcNN getting loaded
# with the default image. So if the first arg fails as a node, but
# is an image ID, assume they have made this mistake and stop.
#
my $_pid = defined($imagepid) ? $imagepid : TB_OPSPID();
if ($first && !defined($imagename) && TBImageID($_pid, $node)) {
print "*** reload: forgot the -i before image name $node?\n";
exit(1);
}
print "*** reload ($node): cannot image node, skipped.\n"; print "*** reload ($node): cannot image node, skipped.\n";
$first = 0;
next; next;
} }
push(@temp, $node); push(@temp, $node);
$first = 0;
} }
@nodes = @temp; @nodes = @temp;
if (! @nodes) { if (! @nodes) {
......
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