-Provide quick and dirty kcmdline templatized support to boottarget (TODO: make faster)

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4097 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2009-09-03 21:02:22 +00:00
parent 507446dfe8
commit 03a1da1064

View File

@ -149,7 +149,7 @@ sub mknetboot
}
my $profile = $ent->{profile};
($tent) = $ttab->getAttribs({'bprofile' => $profile}, 'kernel', 'initrd', 'kcmdline');
($tent) = $ttab->getAttribs({'bprofile' => $profile}, 'kernel', 'initrd', 'kcmdline'); #TODO: coalesce these queries into one Table query, speed it up
if(! defined($tent)){
my $msg = "$profile in nodetype table was not defined in boottarget table";
$callback->({
@ -160,6 +160,14 @@ sub mknetboot
$kernel = $tent->{kernel};
$initrd = $tent->{initrd};
$kcmdline = $tent->{kcmdline};
#TODO: big todo, cheap and rapid, but should be more like esx.pm implementation, i.e. more scalable
while ($kcmdline =~ /#NODEATTRIB:([^:#]+):([^:#]+)#/) {
my $natab = xCAT::Table->new($1);
my $naent = getNodeAttribs($node,[$2]);
my $naval = $naent->{$2};
$add =~ s/#NODEATTRIB:([^:#]+):([^:#]+)#/$naval/;
}
if($initrd eq ''){
$bptab->setNodeAttribs(
$node,