From bfa39ae5e98f3d18f43b95a80a0d4315c795e0db Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Mon, 12 May 2008 23:35:12 +0000 Subject: make sure target sections have no dots --- lib/Smokeping.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm index d29a547..1da8157 100644 --- a/lib/Smokeping.pm +++ b/lib/Smokeping.pm @@ -1967,7 +1967,8 @@ sub get_parser () { # current 'probe' setting. - my $KEYD_RE = '[-_0-9a-zA-Z.]+'; + my $KEYD_RE = '[-_0-9a-zA-Z]+'; + my $KEYDD_RE = '[-_0-9a-zA-Z.]+'; my $PROBE_RE = '[A-Z][a-zA-Z]+'; my $e = "="; my %knownprobes; # the probes encountered so far @@ -2200,8 +2201,8 @@ DOC If you want to have alerts for this target and all targets below it go to a particular address on top of the address already specified in the alert, you can add it here. This can be a comma separated list of items. DOC - slaves => { _re => "(${KEYD_RE}(?:\\s+${KEYD_RE})*)?", - _re_error => 'Use the format: slaves='.${KEYD_RE}.' [slave2]', + slaves => { _re => "(${KEYDD_RE}(?:\\s+${KEYDD_RE})*)?", + _re_error => 'Use the format: slaves='.${KEYDD_RE}.' [slave2]', _doc => < [ qw(secrets) ], _mandatory => [ qw(secrets) ], - _sections => [ "/$KEYD_RE/" ], + _sections => [ "/$KEYDD_RE/" ], secrets => { _sub => sub { return "File '$_[0]' does not exist" unless -f $_[ 0 ]; -- cgit v1.2.3-24-g4f1b