From d2ce3f94eb929dad0d790b87a46f4688a8d6b0da Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 15 Jun 2011 21:14:51 +0200 Subject: Allow passing of options to ping call --- bin/ekgping | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/ekgping b/bin/ekgping index 8641c69..77d311b 100755 --- a/bin/ekgping +++ b/bin/ekgping @@ -35,11 +35,12 @@ GetOptions( ) or usage(); my $host = shift or usage(); +my @ping_opts = @ARGV; my $mixer = SDL::Mixer->new(); my $beep_sound = SDL::Music->new($beep_file); my $ping = harness( - [ 'ping', '-n', $host ], + [ 'ping', '-n', @ping_opts, $host ], '<' => \undef, '>&' => \&parse_ping_output, ); @@ -147,7 +148,7 @@ B - Electrocardiograph-like visual and audible ping =head1 SYNOPSIS -B [B<-q>] [B<-f> I] I +B [B<-q>] [B<-f> I] I [B<--> I] =head1 VERSION @@ -167,6 +168,10 @@ Also, everytime a pong is received, a short beep is played. If the host does not respond for a few seconds (i.e. is unreachable/dead), B produces a continuous beep until the host is reachable again. +If specified, I are passed on to ping(1). Note that B +does not look at them - if they change the output format or set the ping +interval too high, B will break. + =head1 OPTIONS =over -- cgit v1.2.3