From 5152c40eccb5c0a8b954bfbe6012db4b359164e2 Mon Sep 17 00:00:00 2001 From: andywray Date: Fri, 9 Apr 2010 20:47:05 +0000 Subject: [PATCH] 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 --- xCAT-client/bin/pping | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xCAT-client/bin/pping b/xCAT-client/bin/pping index f38e3f023..364bb9fd5 100755 --- a/xCAT-client/bin/pping +++ b/xCAT-client/bin/pping @@ -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); }