From 2e7f1599fe591e59b1c77ad5c689717c199dc13a Mon Sep 17 00:00:00 2001 From: jbjohnso <jbjohnso@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd> Date: Mon, 25 Jun 2012 20:05:11 +0000 Subject: [PATCH] Have autoula addressing store in hosts.ip for KICKSTARTNET directive git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13164 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/Template.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index c0e50415b..5f650e0e1 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -234,15 +234,19 @@ sub subvars { sub kickstartnetwork { my $line = "network --bootproto="; + my $hoststab; my $mactab = xCAT::Table->new('mac',-create=>0); - unless ($mactab) { die "mac table should always exist prior to flexcat specific template processing"; } + unless ($mactab) { die "mac table should always exist prior to template processing when doing autoula"; } my $ent = $mactab->getNodeAttribs($node,['mac']); unless ($ent and $ent->{mac}) { die "missing mac data for $node"; } my $suffix = $ent->{mac}; $suffix = lc($suffix); if ($::XCATSITEVALS{managedaddressmode} eq "autoula") { + unless ($hoststab) { $hoststab = xCAT::Table->new('hosts',-create=>1); } $line .= "static --device=$suffix --noipv4 --ipv6="; - $line .= autoulaaddress($suffix); + my $ulaaddr = autoulaaddress($suffix); + $hoststab->setNodeAttribs($node,{ip=>$ulaaddr}); + $line .= $ulaaddr; } else { $line .= "dhcp"; }