[check_postgres] [commit] Allow emptyok to actually work.
check_postgres at bucardo.org
check_postgres at bucardo.org
Thu Apr 9 03:18:09 UTC 2009
Committed by Greg Sabino Mullane <greg at endpoint.com>
Allow emptyok to actually work.
---
check_postgres.pl | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/check_postgres.pl b/check_postgres.pl
index b0a96f0..83dab45 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
--
1.6.0.5
More information about the Check_postgres
mailing list