2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-07-29 07:41:31 +00:00

Modified judging condition of openbmc in bmcdiscover, if not open enter bmcdiscover_ipmi

This commit is contained in:
XuWei
2017-06-21 22:26:48 -04:00
parent 393026dc47
commit aaa62e3333

View File

@@ -587,18 +587,10 @@ sub scan_process {
my $nmap_cmd = "nmap ${$live_ip}[$i] -p $openbmc_port -Pn";
my $nmap_output = xCAT::Utils->runcmd($nmap_cmd, -1);
if ($nmap_output =~ /$openbmc_port\/tcp (\w+)/) {
my $port_stat = $1;
if ($port_stat eq "open") {
bmcdiscovery_openbmc(${$live_ip}[$i], $opz, $opw, $request_command);
} else {
bmcdiscovery_ipmi(${$live_ip}[$i], $opz, $opw, $request_command);
}
if ($nmap_output =~ /$openbmc_port(.+)open/) {
bmcdiscovery_openbmc(${$live_ip}[$i], $opz, $opw, $request_command);
} else {
my $rsp = {};
push @{ $rsp->{data} }, "Can not get status of 2200 port for ip ${$live_ip}[$i].\n";
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK);
exit 1;
bmcdiscovery_ipmi(${$live_ip}[$i], $opz, $opw, $request_command);
}
exit 0;