Auto-populate nfsserver at discover time if not set

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1331 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2008-05-08 14:08:35 +00:00
parent 0ce949e40e
commit a86c8ea03e

View File

@ -142,10 +142,13 @@ sub process_request {
my $netn = inet_ntoa(pack("N",$ipn & $mask));
my $hosttag = gethosttag($node,$netn,@ifinfo[1],\%usednames);
if ($hosttag) {
(my $rent) = $nrtab->getNodeAttribs($node,'primarynic');
(my $rent) = $nrtab->getNodeAttribs($node,'primarynic','nfsserver');
unless ($rent and $rent->{primarynic}) { #if primarynic not set, set it to this nic
$nrtab->setNodeAttribs($node,{primarynic=>@ifinfo[1]});
}
unless ($rent and $rent->{primarynic}) {
$nrtab->setNodeAttribs($node,{nfsserver=>xCAT::Utils->my_ip_facing($hosttag)});
}
$usednames{$hosttag}=1;
$macstring .= $ifinfo[2]."!".$hosttag."|";
} else {