Commit 07510acc authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Fix bug I had already fixed in old osload that was causing osload to

always load version 0 of an image when specific version requested
parent 26c3c1cb
......@@ -2006,22 +2006,14 @@ sub SetBootOS($$)
my @images = @{$self->GetImages($nodeobject)};
# When loading multiple images, use the osimage from the
# last image
# last image. We no longer do multi-os images.
my $image = $images[-1];
my $imageid = $image->imageid();
my $defosid = $image->default_osid();
my $osimage = OSImage->Lookup($defosid);
if (!defined($osimage)) {
tberror("$self SetBootOS($node_id): could not map OSID $defosid to its object!");
return -1;
print "$self SetBootOS($node_id): changing default OS to $osimage\n";
print "$self SetBootOS($node_id): changing default OS to $image\n";
if (!$TESTMODE) {
if ($nodeobject->OSSelect($image,"def_boot_osid",$self->debug())) {
tberror "$self SetBootOS($node_id): os_select $defosid failed!";
tberror "$self SetBootOS($node_id): os_select $image failed!";
return -1;
......@@ -2035,7 +2027,7 @@ sub SetBootOS($$)
$ocmdline = $nodeobject->def_boot_cmd_line();
$ocmdline = ""
if (!defined($ocmdline));
$osimage->OSBootCmd("delay", \$ncmdline);
$image->OSBootCmd("delay", \$ncmdline);
$ncmdline = ""
if (!defined($ncmdline));
if ($ocmdline ne $ncmdline) {
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