-Check in support for #TABLE# template syntax in boottarget kcmdline to be consistent with Template.pm

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4132 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2009-09-14 20:28:45 +00:00
parent 2c17239888
commit d77754bdc8

View File

@ -167,6 +167,21 @@ sub mknetboot
my $naval = $naent->{$2};
$kcmdline =~ s/#NODEATTRIB:([^:#]+):([^:#]+)#/$naval/;
}
while ($kcmdline =~ /#TABLE:([^:#]+):([^:#]+):([^:#]+)#/) {
if ($2 =~ /THISNODE/ or $2 =~ /\$NODE/) {
my $natab = xCAT::Table->new($1);
my $naent = $natab->getNodeAttribs($node,[$3]);
my $naval = $naent->{$3};
$kcmdline =~ s/#NODEATTRIB:([^:#]+):([^:#]+):([^:#]+)#/$naval/;
} else {
my $msg = "Table key of $2 not yet supported by boottarget mini-template";
$callback->({
error => ["$msg"],
errorcode => [1]
});
}
}
if($initrd eq ''){
$bptab->setNodeAttribs(