From 5719334816f620c7636470022ee9d3212d72978b Mon Sep 17 00:00:00 2001 From: ertaozh Date: Fri, 1 Dec 2017 10:21:38 -0500 Subject: [PATCH] Fix issue #4397: rspconfig <> hostname=xxx show error message when there is multiple network in bmc --- xCAT-server/lib/xcat/plugins/openbmc.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 5c8a43e32..f4de5f306 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -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);