From 3073ff5469311973465ea55bcc078b84edae94f8 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 29 Jun 2009 18:41:00 +0000 Subject: [PATCH] -Implement addkcmdline handling in yaboot plugin -Comment out redundant anaconda handling of addkcmdline handling since it is moved to pxe and yaboot plugins git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3657 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/anaconda.pm | 28 ++++++++++++------------ xCAT-server/lib/xcat/plugins/yaboot.pm | 5 ++++- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 96efc19dc..70157be2c 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -178,8 +178,8 @@ sub mknetboot my $hmhash = $hmtab->getNodesAttribs(\@nodes, ['serialport', 'serialspeed', 'serialflow']); - my $addkcmdhash = - $bptab->getNodesAttribs(\@nodes, ['addkcmdline']); + #my $addkcmdhash = + # $bptab->getNodesAttribs(\@nodes, ['addkcmdline']); foreach $node (@nodes) { my $ent = $oents{$node}->[0]; #ostab->getNodeAttribs($node, ['os', 'arch', 'profile']); @@ -360,13 +360,13 @@ sub mknetboot } # add the addkcmdline attribute to the end # of the command, if it exists - my $addkcmd = $addkcmdhash->{$node}->[0]; + #my $addkcmd = $addkcmdhash->{$node}->[0]; # add the extra addkcmd command info, if in the table - if ($addkcmd->{'addkcmdline'}) { - $kcmdline .= " "; - $kcmdline .= $addkcmd->{'addkcmdline'}; + #if ($addkcmd->{'addkcmdline'}) { + # $kcmdline .= " "; + # $kcmdline .= $addkcmd->{'addkcmdline'}; - } + #} my $kernstr="xcat/netboot/$osver/$arch/$profile/kernel"; if ($xenstyle) { @@ -410,8 +410,8 @@ sub mkinstall my %hents = %{$hmtab->getNodesAttribs(\@nodes, ['serialport', 'serialspeed', 'serialflow'])}; - my $addkcmdhash = - $bptab->getNodesAttribs(\@nodes, ['addkcmdline']); + #my $addkcmdhash = + # $bptab->getNodesAttribs(\@nodes, ['addkcmdline']); require xCAT::Template; foreach $node (@nodes) { @@ -624,12 +624,12 @@ sub mkinstall $kcmdline .= " noipv6"; # add the addkcmdline attribute to the end # of the command, if it exists - my $addkcmd = $addkcmdhash->{$node}->[0]; + #my $addkcmd = $addkcmdhash->{$node}->[0]; # add the extra addkcmd command info, if in the table - if ($addkcmd->{'addkcmdline'}) { - $kcmdline .= " "; - $kcmdline .= $addkcmd->{'addkcmdline'}; - } + #if ($addkcmd->{'addkcmdline'}) { + # $kcmdline .= " "; + # $kcmdline .= $addkcmd->{'addkcmdline'}; + #} $bptab->setNodeAttribs( $node, diff --git a/xCAT-server/lib/xcat/plugins/yaboot.pm b/xCAT-server/lib/xcat/plugins/yaboot.pm index 273e6a53c..598afe672 100644 --- a/xCAT-server/lib/xcat/plugins/yaboot.pm +++ b/xCAT-server/lib/xcat/plugins/yaboot.pm @@ -86,6 +86,9 @@ sub setstate { } $kern->{kcmdline} =~ s/!myipfn!/$ipfn/; } + if ($kern->{addkcmdline}) { + $kern->{kcmdline} .= " ".$kern->{addkcmdline}; + } my $pcfg; unless (-d "$tftpdir/etc") { mkpath("$tftpdir/etc"); @@ -316,7 +319,7 @@ sub process_request { } if ($errored) { return; } my $bptab=xCAT::Table->new('bootparams',-create=>1); - my $bphash = $bptab->getNodesAttribs(\@nodes,['kernel','initrd','kcmdline']); + my $bphash = $bptab->getNodesAttribs(\@nodes,['kernel','initrd','kcmdline','addkcmdline']); my $chaintab=xCAT::Table->new('chain',-create=>1); my $chainhash=$chaintab->getNodesAttribs(\@nodes,['currstate']); my $mactab=xCAT::Table->new('mac',-create=>1);