fix for bug 3947: add check for AIX and nmap existence

This commit is contained in:
ligc 2014-01-08 23:26:09 +08:00
parent 45d05d26f0
commit 19a14d711d
2 changed files with 9 additions and 0 deletions

8
perl-xCAT/xCAT/SLP.pm Normal file → Executable file
View File

@ -98,6 +98,14 @@ sub dodiscover {
}
my $printinfo = join(",", @printip);
if ($unicast) {
if (xCAT::Utils->isAIX()){
send_message($args{reqcallback}, 1, "lsslp unicast is not supported on AIX");
exit 1;
}
if (! -f "/usr/bin/nmap"){
send_message($args{reqcallback}, 1, "nmap does not exist, lsslp unicast is not possible");
exit 1;
}
my @servernodes;
my @iprange = split /,/, $ipranges;
foreach my $range (@iprange) {

View File

@ -37,6 +37,7 @@ B<-h> Display usage message.
B<-n> Only display and write the newly discovered hardwares.
B<-u> Do unicast to a specified IP range. Must be used with -s and --range.
The -u flag is not supported on AIX.
B<--range> Specify one or more IP ranges. Must be use in unicast mode.
It accepts multiple formats. For example, 192.168.1.1/24, 40-41.1-2.3-4.1-100.