From 6bc58adaa6e80820b9ee4af881e36d2993f95203 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Wed, 17 Dec 2008 13:29:45 -0500 Subject: Version 2.5.3: small regex fix in verify_version (Lee Jensen via Jeff Frost) --- check_postgres.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'check_postgres.pl') diff --git a/check_postgres.pl b/check_postgres.pl index 19504b017..51df7209e 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -28,7 +28,7 @@ $Data::Dumper::Varname = 'POSTGRES'; $Data::Dumper::Indent = 2; $Data::Dumper::Useqq = 1; -our $VERSION = '2.5.2'; +our $VERSION = '2.5.3'; use vars qw/ %opt $PSQL $res $COM $SQL $db /; @@ -1222,7 +1222,7 @@ sub verify_version { die "Could not fetch setting '$setting'\n"; } my $val = $info->{db}[0]{slurp}; - if ($val ne 'on') { + if ($val !~ /^on\b/) { die qq{Cannot run "$action": $setting is not set to on\n}; } } @@ -3748,7 +3748,7 @@ sub show_dbstats { =head1 NAME B - a Postgres monitoring script for Nagios, MRTG, Cacti, and others -This documents describes check_postgres.pl version 2.5.2 +This documents describes check_postgres.pl version 2.5.3 =head1 SYNOPSIS @@ -4976,6 +4976,10 @@ Items not specifically attributed are by Greg Sabino Mullane. =over 4 +=item B (December 17, 2008) + + Minor fix to regex in verify_version (Lee Jensen) + =item B (December 16, 2008) Minor documentation tweak. -- cgit v1.2.3