vim
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3515 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
05c9e4b58f
commit
23b516e289
@ -32,14 +32,18 @@ sub addnode {
|
||||
my $foundone=0;
|
||||
|
||||
while ($idx <= $#hosts) {
|
||||
if ($hosts[$idx] =~ /^${ip}\s/ or $hosts[$idx] =~ /^\d+\.\d+\.\d+\.\d+\s+${node}\s/) {
|
||||
if ($hosts[$idx] =~ /^${ip}\s/ or $hosts[$idx] =~ /^\d+\.\d+\.\d+\.\d+\s+${node}[\s\.r/) {
|
||||
#TODO: if foundone, delete a dupe
|
||||
$hosts[$idx]=build_line($ip, $node, $domain, $othernames);
|
||||
if ($foundone) {
|
||||
$hosts[$idx]="";
|
||||
} else {
|
||||
$hosts[$idx]=build_line($ip, $node, $domain, $othernames);
|
||||
}
|
||||
$foundone=1;
|
||||
return;
|
||||
}
|
||||
$idx++;
|
||||
}
|
||||
if ($foundone) { return;}
|
||||
|
||||
my $line=build_line($ip, $node, $domain, $othernames);
|
||||
push @hosts, $line;
|
||||
|
Loading…
Reference in New Issue
Block a user