summaryrefslogtreecommitdiff
path: root/check_postgres.pl
diff options
context:
space:
mode:
authorGreg Sabino Mullane2009-04-09 02:48:10 +0000
committerGreg Sabino Mullane2009-04-09 02:48:10 +0000
commit6d843dbe97aa332234e6b176eb28e6d3785748b6 (patch)
tree119fcf6e7216be87d90e5c58f3de9389cab28e14 /check_postgres.pl
parente6bed5d10b1b33021d49f2c435682f7b435a30a8 (diff)
Allow emptyok to actually work.
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-xcheck_postgres.pl3
1 files changed, 2 insertions, 1 deletions
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