diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-06-15 21:14:51 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-06-15 21:14:51 +0200 |
commit | d2ce3f94eb929dad0d790b87a46f4688a8d6b0da (patch) | |
tree | 7fe1afab51c4a6ecfb7e6ba29a4d338afec1a3e0 /bin | |
parent | 432a1956a6386078049dd6007201f336a3b0910a (diff) |
Allow passing of options to ping call
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ekgping | 9 |
1 files changed, 7 insertions, 2 deletions
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<ekgping> - Electrocardiograph-like visual and audible ping =head1 SYNOPSIS -B<ekgping> [B<-q>] [B<-f> I<file>] I<host> +B<ekgping> [B<-q>] [B<-f> I<file>] I<host> [B<--> I<ping options>] =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<ekgping> produces a continuous beep until the host is reachable again. +If specified, I<ping options> are passed on to ping(1). Note that B<ekgping> +does not look at them - if they change the output format or set the ping +interval too high, B<ekgping> will break. + =head1 OPTIONS =over |