Add switchto allow pping to use fping.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5736 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
andywray 2010-04-09 20:47:05 +00:00
parent 4abd98423e
commit 5152c40ecc

View File

@ -22,11 +22,13 @@ use IO::Select;
use Getopt::Long;
my $USAGE="Usage: pping [-i|--interface interfaces] noderange
pping -f|--use_fping
pping -h|--help
pping -v|--version\n";
my $interface;
if(!GetOptions(
'f|use_fping' => \$::USE_FPING,
'h|help' => \$::HELP,
'v|version' => \$::VERSION,
'X|noexpand' => \$::NOEXPAND,
@ -101,6 +103,9 @@ unless (scalar(@nodes)) {
#$SIG{CHLD} = sub { while (waitpid(-1,WNOHANG) > 0) { $children--; } };
my $usenmap = (-x '/usr/bin/nmap' or -x '/usr/local/bin/nmap');
if ($::USE_FPING) { # Use fping instead of nmap
$usenmap = 0;
}
my @interfaces;
if ($interface) { @interfaces = split(/,/, $interface); }