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

Bug #4693 switchdiscover -w return wrong info if no switch discovered

This commit is contained in:
Casandra Qiu
2015-06-16 10:32:50 -04:00
parent 62a2bc6b87
commit d707d7f12d

View File

@ -390,6 +390,12 @@ sub process_request {
}
}
}
if (!($result)) {
send_msg( \%request, 0, " No switch found ");
return;
}
my $display_done = 0;
if (exists($globalopt{r})) {
@ -609,7 +615,7 @@ sub nmap_scan {
my $ccmd;
send_msg($request, 0, "Discovering switches using nmap. It may take long time...");
send_msg($request, 0, "Discovering switches using nmap for @$ranges. It may take long time...");
#################################################
# If --range options, take iprange, if noderange is defined
# us the ip addresses of the nodes. If none is define, use the