From 6d843dbe97aa332234e6b176eb28e6d3785748b6 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Wed, 8 Apr 2009 22:48:10 -0400 Subject: Allow emptyok to actually work. --- check_postgres.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'check_postgres.pl') diff --git a/check_postgres.pl b/check_postgres.pl index b0a96f0f6..83dab4500 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -1593,6 +1593,7 @@ sub run_command { ## Allow an empty query (no matching rows) if requested if ($arg->{emptyok} and $db->{slurp} =~ /^\s*$/o) { + $arg->{emptyok2} = 1; } ## If we just want a version, grab it and redo @@ -1612,7 +1613,7 @@ sub run_command { } ## If we were provided with a regex, check and bail if it fails - elsif ($arg->{regex}) { + elsif ($arg->{regex} and ! $arg->{emptyok2}) { if ($db->{slurp} !~ $arg->{regex}) { ## Check if problem is due to backend being too old for this check -- cgit v1.2.3