2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-18 04:10:46 +00:00

Merge pull request #4012 from whowutwut/bmcdiscover_port

Assume that any bmc that has nmap response on the openbmc_port is a openbmc server
This commit is contained in:
cxhong
2017-10-03 16:14:57 -04:00
committed by GitHub

View File

@ -670,7 +670,8 @@ 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(.+)open/) {
if ($nmap_output !~ /$openbmc_port(.+)closed/) {
# If the openbmc_port is anything execpt 'closed' assume it's OpenBMC server
bmcdiscovery_openbmc(${$live_ip}[$i], $opz, $opw, $request_command);
} else {
bmcdiscovery_ipmi(${$live_ip}[$i], $opz, $opw, $request_command);