2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 03:32:04 +00:00

makehosts: prevents redundant names in /etc/hosts when aliases are defined

This commit is contained in:
Kilian Cavalotti 2017-02-06 14:53:08 -08:00
parent f61d1944b9
commit 258084cbc1

View File

@ -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 {