From 03a1da10647a4f82dcc9a009191556a2c88329db Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Thu, 3 Sep 2009 21:02:22 +0000 Subject: [PATCH] -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 --- xCAT-server/lib/xcat/plugins/boottarget.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/boottarget.pm b/xCAT-server/lib/xcat/plugins/boottarget.pm index 91bb719b2..b9a7c0f2c 100644 --- a/xCAT-server/lib/xcat/plugins/boottarget.pm +++ b/xCAT-server/lib/xcat/plugins/boottarget.pm @@ -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,