From 2206afb0d6aaf857ecf739ae0b639bf215106294 Mon Sep 17 00:00:00 2001 From: Niko Tyni Date: Fri, 18 Feb 2005 20:55:29 +0000 Subject: * complain if pings < 3 * show the smoke for pings == 3 too, not only if >3 --- lib/Smokeping/probes/basefork.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/Smokeping/probes/basefork.pm') diff --git a/lib/Smokeping/probes/basefork.pm b/lib/Smokeping/probes/basefork.pm index b7b5554..4f50467 100644 --- a/lib/Smokeping/probes/basefork.pm +++ b/lib/Smokeping/probes/basefork.pm @@ -125,6 +125,12 @@ sub targetvars { return $class->_makevars($class->SUPER::targetvars, { pings => { _re => '\d+', + _sub => sub { + my $val = shift; + return "ERROR: The pings value must be at least 3." + if $val < 3; + return undef; + }, _example => 5, _doc => <