From a86c8ea03eb7615ed1050aaefe5e8cb376f11333 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Thu, 8 May 2008 14:08:35 +0000 Subject: [PATCH] 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 --- xCAT-server-2.0/lib/xcat/plugins/nodediscover.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xCAT-server-2.0/lib/xcat/plugins/nodediscover.pm b/xCAT-server-2.0/lib/xcat/plugins/nodediscover.pm index a277388e3..14d3dd49b 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/nodediscover.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/nodediscover.pm @@ -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 {