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

Instead of testing for open, test if NOT closed,then OpenBMC

This commit is contained in:
Victor Hu
2017-10-03 14:01:07 -04:00
parent 6f1e0bdab9
commit df6209c381

View File

@@ -670,8 +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(.+)/) {
# if the openbmc_port exists at any nmap status, assume it's an OpenBMC server
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);