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};