[check_postgres] [commit] Throw an exception when NO_PSQL_OPTION is off but --PSQL is used.

check_postgres at bucardo.org check_postgres at bucardo.org
Mon Feb 16 20:48:25 UTC 2009


Committed by Greg Sabino Mullane <greg at endpoint.com>

Throw an exception when NO_PSQL_OPTION is off but --PSQL is used.

---
 check_postgres.pl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/check_postgres.pl b/check_postgres.pl
index b449068..96fef37 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -261,6 +261,7 @@ our %msg = (
 	'symlink-done'       => qq{Not creating "\$1": \$2 already linked to "\$3"\n},
 	'symlink-fail'       => qq{Could not symlink \$1 to \$2: \$3\n},
 	'no-target-database' => q{No target databases could be found},
+	'psql-no-opt'        => q{Cannot use the --PSQL option when NO_PSQL_OPTION is on},
 },
 'de' => {
 	'T-BAD-QUERY'        => q{Invalid query returned:},
@@ -399,7 +400,7 @@ sub msg {
 
 ## Everything from here on out needs psql, so find and verify a working version:
 if ($NO_PSQL_OPTION) {
-	delete $opt{PSQL};
+	delete $opt{PSQL} and ndie msg('psql-no-opt');
 }
 
 if (! defined $PSQL or ! length $PSQL) {
-- 
1.6.0.5



More information about the Check_postgres mailing list