From b49d3eb65f65aaa75219d9754b1b137f46c82d0e Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Sat, 27 Oct 2007 15:55:42 +0000 Subject: rmove -S warning unless sourceaddressing is used --- lib/Smokeping/probes/FPing.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 = ( -- cgit v1.2.3-24-g4f1b