mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-22 11:42:05 +00:00
makehosts: prevents redundant names in /etc/hosts when aliases are defined
This commit is contained in:
parent
f61d1944b9
commit
258084cbc1
@ -87,13 +87,10 @@ sub addnode
|
||||
|
||||
# we're processing the nics table and we found an
|
||||
# existing entry for this ip so just add this
|
||||
# ode name as an alias for the existing entry
|
||||
# node name as an alias for the existing entry
|
||||
chomp($hosts[$idx]);
|
||||
my ($hip, $hnode, $hdom, $hother) = split(/ /, $hosts[$idx]);
|
||||
|
||||
# at this point "othernames", if any is just a space
|
||||
# elimited list - so just add the node name to the list
|
||||
$othernames .= " $node";
|
||||
$hosts[$idx] = build_line($callback, $ip, $hnode, $domain, $othernames);
|
||||
} else {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user