2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-12 17:30:19 +00:00

Fix issue #4397: rspconfig <> hostname=xxx show error message when there is multiple network in bmc

This commit is contained in:
ertaozh
2017-12-01 10:21:38 -05:00
parent 22d9dcd55b
commit 5719334816

View File

@ -2475,6 +2475,13 @@ sub rspconfig_response {
}
}
}
if ($grep_string =~ /(.*)hostname(.*)/) {
xCAT::SvrUtils::sendmsg("BMC hostname: $hostname", $callback, $node);
unless ($1 or $2) {
$wait_node_num--;
return;
}
}
if (scalar (keys %nicinfo) == 0) {
$error = "No valid BMC network information";
$node_info{$node}{cur_status} = "";
@ -2514,8 +2521,6 @@ sub rspconfig_response {
push @output, @gateway;
} elsif ($opt eq "vlan") {
push @output, @vlan;
} elsif ($opt eq "hostname") {
push @output, "BMC Hostname: $hostname";
}
}
xCAT::SvrUtils::sendmsg("$_", $callback, $node) foreach (@output);