2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-12 06:20:14 +00:00

fixed bug where nodeset osimage=foo wouldn't look for default template file if it wasn't found in linuximage table

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5901 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
vallard
2010-04-27 15:54:13 +00:00
parent 7f791be248
commit 4bee8ba358

View File

@@ -612,6 +612,19 @@ sub mkinstall
$img_hash{$imagename}->{pkgdir}=$ref1->{'pkgdir'};
}
}
# if the install template wasn't found, then lets look for it in the default locations.
unless($img_hash{$imagename}->{template}){
my $pltfrm=xCAT_plugin::anaconda::getplatform($ref->{'osvers'});
my $tmplfile=xCAT::SvrUtils::get_tmpl_file_name("$installroot/custom/install/$pltfrm",
$ref->{'profile'}, $ref->{'osvers'}, $ref->{'osarch'}, $ref->{'osvers'});
if (! $tmplfile) { $tmplfile=xCAT::SvrUtils::get_tmpl_file_name("$::XCATROOT/share/xcat/install/$pltfrm",
$ref->{'profile'}, $ref->{'osvers'}, $ref->{'osarch'}, $ref->{'osvers'});
}
# if we managed to find it, put it in the hash:
if($tmplfile){
$img_hash{$imagename}->{template}=$tmplfile;
}
}
} else {
$callback->(
{error => ["The os image $imagename does not exists on the osimage table for $node"],