Make sure --action overrides the naming trick.
authorGreg Sabino Mullane <[email protected]>
Fri, 24 Jun 2011 17:50:55 +0000 (13:50 -0400)
committerGreg Sabino Mullane <[email protected]>
Fri, 24 Jun 2011 17:50:55 +0000 (13:50 -0400)
check_postgres.pl

index e9c499939c186c143c86cf9540f10421d10cc38d..b432e16b9d6cd7d6716c6a029d8abd9dc31b2d31 100755 (executable)
@@ -901,7 +901,7 @@ our $SIMPLE = $OUTPUT eq 'simple' ? 1 : 0;
 
 ## See if we need to invoke something based on our name
 our $action = $opt{action} || '';
-if ($ME =~ /check_postgres_(\w+)/) {
+if ($ME =~ /check_postgres_(\w+)/ and ! defined $opt{action}) {
     $action = $1;
 }