diff options
author | Tobi Oetiker <tobi@oetiker.ch> | 2007-10-27 17:55:42 +0200 |
---|---|---|
committer | Tobi Oetiker <tobi@oetiker.ch> | 2007-10-27 17:55:42 +0200 |
commit | b49d3eb65f65aaa75219d9754b1b137f46c82d0e (patch) | |
tree | 7728d6d69c52bbcb1fd346b6c9ab0ff7be447f3c /lib/Smokeping | |
parent | b2974cc84cbbefb8d117765acb7230530963aa5c (diff) | |
download | smokeping-b49d3eb65f65aaa75219d9754b1b137f46c82d0e.tar.gz smokeping-b49d3eb65f65aaa75219d9754b1b137f46c82d0e.tar.xz |
rmove -S warning unless sourceaddressing is used
Diffstat (limited to 'lib/Smokeping')
-rw-r--r-- | lib/Smokeping/probes/FPing.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Smokeping/probes/FPing.pm b/lib/Smokeping/probes/FPing.pm index c6cb9bc..331fabf 100644 --- a/lib/Smokeping/probes/FPing.pm +++ b/lib/Smokeping/probes/FPing.pm @@ -60,7 +60,6 @@ sub new($$$) my $testhost = $self->testhost; my $return = `$binary -C 1 $testhost 2>&1`; $self->{enable}{S} = (`$binary -h 2>&1` =~ /\s-S\s/); - warn "NOTE: your fping binary doesn't support source address setting (-S), I will ignore any sourceaddress configurations - see http://bugs.debian.org/198486.\n" if !$self->{enable}{S}; croak "ERROR: fping ('$binary -C 1 $testhost') could not be run: $return" if $return =~ m/not found/; croak "ERROR: FPing must be installed setuid root or it will not work\n" @@ -115,6 +114,9 @@ sub ping ($){ push @params, "-t" . int(1000 * $self->{properties}{timeout}) if $self->{properties}{timeout}; push @params, "-i" . int(1000 * $self->{properties}{mininterval}); push @params, "-p" . int(1000 * $self->{properties}{hostinterval}) if $self->{properties}{hostinterval}; + if ($self->rounds_count == 1 and $self->{properties}{sourceaddress} and not $self->{enable}{S}){ + do_log("WARNING: your fping binary doesn't support source address setting (-S), I will ignore any sourceaddress configurations - see http://bugs.debian.org/198486."); + } push @params, "-S$self->{properties}{sourceaddress}" if $self->{properties}{sourceaddress} and $self->{enable}{S}; my @cmd = ( |