From c308aa725e2d3ff78f00cd4cf896f69b4340637b Mon Sep 17 00:00:00 2001 From: ligc Date: Sun, 7 Apr 2013 06:53:05 +0000 Subject: [PATCH] fix for bug 3476: remove empty nics definition from nics table git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@15847 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/DBobjUtils.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/perl-xCAT/xCAT/DBobjUtils.pm b/perl-xCAT/xCAT/DBobjUtils.pm index b4e600ba1..890c9ca83 100644 --- a/perl-xCAT/xCAT/DBobjUtils.pm +++ b/perl-xCAT/xCAT/DBobjUtils.pm @@ -2736,8 +2736,13 @@ sub collapsenicsattr() { if ($1 && $2) { - # $nicattrs{nicips}{eth0} = "1.1.1.1|1.2.1.1" - $nicattrs{$1}{$2} = $nodeattrhash->{$nodeattr}; + # chdef nicips.eth2= to remove the definition for eth2 + # in this case, the $nodeattrhash->{'nicips.eth0'} is blank + if ($nodeattrhash->{$nodeattr}) + { + # $nicattrs{nicips}{eth0} = "1.1.1.1|1.2.1.1" + $nicattrs{$1}{$2} = $nodeattrhash->{$nodeattr}; + } # remove nicips.eth0 from the %::FILEATTRS delete $nodeattrhash->{$nodeattr};