diff --git a/xCAT-server/lib/xcat/plugins/hosts.pm b/xCAT-server/lib/xcat/plugins/hosts.pm index bf0cd10ec..f2a8f3327 100755 --- a/xCAT-server/lib/xcat/plugins/hosts.pm +++ b/xCAT-server/lib/xcat/plugins/hosts.pm @@ -72,7 +72,6 @@ sub addnode # if this ip was already added then just update the entry while ($idx <= $#hosts) { - if ($hosts[$idx] =~ /^${ip}\s/ or $hosts[$idx] =~ /^\d+\.\d+\.\d+\.\d+\s+${node}[\s\.\r]/) { @@ -661,7 +660,10 @@ sub donics if (!$nicip) { next; } - + #Only support format for nicips is :!||... or ! + if ($nicip =~ /^\|\S*\|$/) { + $nicip = xCAT::Table::transRegexAttrs($node, $nicip); + } if ($nicip =~ /\|/) { my @ips = split(/\|/, $nicip); foreach my $ip (@ips) {