2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-31 10:06:39 +00:00

Merge pull request #3493 from zet809/fix_issue_3490

fix issue 3490: "rscan <hmc> -w" will delete ip attribute of node whi…
This commit is contained in:
Xiaopeng Wang 2017-07-19 16:09:43 +08:00 committed by GitHub
commit 8e6fdfde3d

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