summaryrefslogtreecommitdiffstats
path: root/plugins/check_pgsql.c
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2008-05-07 10:02:42 (GMT)
committerThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2008-05-07 10:02:42 (GMT)
commit44f8455b2cf248c6f50c35bfc3510d2946084c5b (patch)
tree26b696c5d61872f1d41466be9fcc650c22d75aeb /plugins/check_pgsql.c
parent4d157889e3018119e07bdcc7f48afde1422f7396 (diff)
downloadmonitoring-plugins-44f8455b2cf248c6f50c35bfc3510d2946084c5b.tar.gz
Added support for --extra-opts in all C plugins (disabled by default, see configure --help)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1991 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_pgsql.c')
-rw-r--r--plugins/check_pgsql.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c
index c721b07..1a93f6b 100644
--- a/plugins/check_pgsql.c
+++ b/plugins/check_pgsql.c
@@ -150,6 +150,9 @@ main (int argc, char **argv)
150 bindtextdomain (PACKAGE, LOCALEDIR); 150 bindtextdomain (PACKAGE, LOCALEDIR);
151 textdomain (PACKAGE); 151 textdomain (PACKAGE);
152 152
153 /* Parse extra opts if any */
154 argv=np_extra_opts (&argc, argv, progname);
155
153 if (process_arguments (argc, argv) == ERROR) 156 if (process_arguments (argc, argv) == ERROR)
154 usage4 (_("Could not parse arguments")); 157 usage4 (_("Could not parse arguments"));
155 158
@@ -412,6 +415,7 @@ print_help (void)
412 print_usage (); 415 print_usage ();
413 416
414 printf (_(UT_HELP_VRSN)); 417 printf (_(UT_HELP_VRSN));
418 printf (_(UT_EXTRA_OPTS));
415 419
416 printf (_(UT_HOST_PORT), 'P', myport); 420 printf (_(UT_HOST_PORT), 'P', myport);
417 421
@@ -447,6 +451,12 @@ print_help (void)
447 printf (" %s\n", _("able to connect to the database without a password. The plugin can also send")); 451 printf (" %s\n", _("able to connect to the database without a password. The plugin can also send"));
448 printf (" %s\n", _("a password, but no effort is made to obsure or encrypt the password.")); 452 printf (" %s\n", _("a password, but no effort is made to obsure or encrypt the password."));
449 453
454#ifdef NP_EXTRA_OPTS
455 printf ("\n");
456 printf ("%s\n", _("Notes:"));
457 printf (_(UT_EXTRA_OPTS_NOTES));
458#endif
459
450 printf (_(UT_SUPPORT)); 460 printf (_(UT_SUPPORT));
451} 461}
452 462