From dbebcddf5f4367d66d8150144aeb5af954f1caa5 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 7 Dec 2017 14:30:26 -0500 Subject: [PATCH] Display hostname even if multiple IP addresses --- xCAT-server/lib/xcat/plugins/openbmc.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 9870a2c4e..015a9f6c0 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -2751,7 +2751,8 @@ sub rspconfig_response { # an adapter with a single IP address set. $error = "Interfaces with multiple IP addresses are not supported"; $node_info{$node}{cur_status} = ""; - last; + # Terminate loop on this error unless we are looking for hostname to display + last unless ($grep_string =~ /(.*)hostname(.*)/); } $nicinfo{$nic}{address} = $content{Address}; } @@ -2783,7 +2784,7 @@ sub rspconfig_response { $node_info{$node}{cur_status} = ""; } if ($error) { - xCAT::SvrUtils::sendmsg("$error", $callback, $node); + xCAT::SvrUtils::sendmsg([1,"$error"], $callback, $node); } else { my @address = (); my @ipsrc = ();