[smokeping-users] Re: ERROR: x.y has no probe defined
Niko Tyni
ntyni+smokeping-users at mappi.helsinki.fi
Thu Apr 25 08:17:13 MEST 2002
> My problem was that the webserver user didn't have execute permissions
> on the fping binary, not that it should need them mind...
Good point. Tobi, how about something like this? I can't see
$self->{pingfactor} used anywhere else.
--- FPing.pm 2002/04/25 06:08:59 1.1
+++ FPing.pm 2002/04/25 06:16:07
@@ -34,6 +34,9 @@
my $class = ref($proto) || $proto;
my $self = $class->SUPER::new(@_);
+ # the webserver doesn't need anything below
+ return $self if $ENV{SERVER_SOFTWARE};
+
croak "ERROR: FPing 'binary' not defined in FPing probe definition"
unless defined $self->{properties}{binary};
@@ -44,10 +47,10 @@
croak "ERROR: FPing must be installed setuid root or it will not work\n" if m/only.+root/;
if (m/bytes, ([0-9.]+)\sms\s+.*\n.*\n.*:\s+([0-9.]+)/){
$self->{pingfactor} = 1000 * $2/$1;
- print "### fping seems to report in ", $1/$2, " miliseconds\n" unless $ENV{SERVER_SOFTWARE};
+ print "### fping seems to report in ", $1/$2, " milliseconds\n";
} else {
$self->{pingfactor} = 1000; # Gives us a good-guess default
- print "### assuming you are using an fping copy reporting in miliseconds\n" unless $ENV{SERVER_SOFTWARE};
+ print "### assuming you are using an fping copy reporting in milliseconds\n";
};
return $self;
}
--
niko
--
Unsubscribe mailto:smokeping-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:smokeping-users-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/smokeping-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the smokeping-users
mailing list