From 93473681234c52f3eae4858c1dc2c2ea4831282b Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 14 Sep 2009 21:04:09 +0000 Subject: [PATCH] -Fix errors in the #TABLE:# template support in boottarget git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4133 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/boottarget.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/boottarget.pm b/xCAT-server/lib/xcat/plugins/boottarget.pm index 779d18ec5..74a0dda2f 100644 --- a/xCAT-server/lib/xcat/plugins/boottarget.pm +++ b/xCAT-server/lib/xcat/plugins/boottarget.pm @@ -168,11 +168,14 @@ sub mknetboot $kcmdline =~ s/#NODEATTRIB:([^:#]+):([^:#]+)#/$naval/; } while ($kcmdline =~ /#TABLE:([^:#]+):([^:#]+):([^:#]+)#/) { + my $tabname = $1; + my $keyname = $2; + my $colname = $3; 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/; + my $natab = xCAT::Table->new($tabname); + my $naent = $natab->getNodeAttribs($node,[$colname]); + my $naval = $naent->{$colname}; + $kcmdline =~ s/#TABLE:([^:#]+):([^:#]+):([^:#]+)#/$naval/; } else { my $msg = "Table key of $2 not yet supported by boottarget mini-template"; $callback->({