From 0b08676d8cd71d5ddfc8e5759dc8ef76979c71e4 Mon Sep 17 00:00:00 2001 From: daniceexi Date: Tue, 7 May 2013 04:22:48 +0000 Subject: [PATCH] only set the groups attribute to default value when it was null git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16198 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/seqdiscovery.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/seqdiscovery.pm b/xCAT-server/lib/xcat/plugins/seqdiscovery.pm index 78308f8e0..08052a707 100644 --- a/xCAT-server/lib/xcat/plugins/seqdiscovery.pm +++ b/xCAT-server/lib/xcat/plugins/seqdiscovery.pm @@ -228,9 +228,15 @@ sub findme { $nltab->setNodeAttribs($bmcname, {groups=>$param{'groups'}.",bmc"}); } } else { - $nltab->setNodeAttribs($node, {groups=>"all"}); + my $nlent = $nltab->getNodeAttribs($node,['groups']); + if (!$nlent || !$nlent->{'groups'}) { + $nltab->setNodeAttribs($node, {groups=>"all"}); + } if ($bmcname) { - $nltab->setNodeAttribs($bmcname, {groups=>"all,bmc"}); + $nlent = $nltab->getNodeAttribs($bmcname,['groups']); + if (!$nlent || !$nlent->{'groups'}) { + $nltab->setNodeAttribs($bmcname, {groups=>"all,bmc"}); + } } }