2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 09:13:08 +00:00

fix issue 3490: "rscan <hmc> -w" will delete ip attribute of node which was defined ahead

This commit is contained in:
ertaozh 2017-07-18 05:30:39 -04:00
parent 6ca241c9d0
commit 9e1008b18a

View File

@ -217,14 +217,16 @@ sub add_ppc {
###############################
# Update hosts table
###############################
if ($otherinterfaces) {
$db{hosts}->setNodeAttribs($name,
{ otherinterfaces => $ips });
} else {
$db{hosts}->setNodeAttribs($name,
{ ip => $ips });
if ($ips) {
if ($otherinterfaces) {
$db{hosts}->setNodeAttribs($name,
{ otherinterfaces => $ips });
} else {
$db{hosts}->setNodeAttribs($name,
{ ip => $ips });
}
$db{hosts}{commit} = 1;
}
$db{hosts}{commit} = 1;
###############################
# Update mac table