diff --git a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm index 4264f519d..27defb307 100644 --- a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm +++ b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm @@ -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);