[nagiosplug] unified ipv4/6 usage and help text

Nagios Plugin Development nagios-plugins at users.sourceforge.net
Wed Nov 28 11:10:40 CET 2012


 Module: nagiosplug
 Branch: master
 Commit: 24772e755e9d2a255e36eb2a97f545d2cb7ade3c
 Author: Sven Nierlein <sven at nierlein.de>
   Date: Wed Nov 28 11:03:11 2012 +0100
    URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=24772e7

unified ipv4/6 usage and help text

---

 plugins/check_ldap.c     |    5 -----
 plugins/check_ntp.c      |    3 ++-
 plugins/check_ntp_peer.c |    3 ++-
 plugins/check_ntp_time.c |    3 ++-
 plugins/check_pgsql.c    |    2 +-
 plugins/check_ssh.c      |    2 +-
 6 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c
index 65db851..b05aca9 100644
--- a/plugins/check_ldap.c
+++ b/plugins/check_ldap.c
@@ -445,11 +445,6 @@ print_help (void)
 	printf (UT_SUPPORT);
 }
 
-/* todo
-* add option -4 and -6 to the long manual
-*
-*/
-
 void
 print_usage (void)
 {
diff --git a/plugins/check_ntp.c b/plugins/check_ntp.c
index 76d19ba..7d18919 100644
--- a/plugins/check_ntp.c
+++ b/plugins/check_ntp.c
@@ -845,6 +845,7 @@ void print_help(void){
 	printf (UT_HELP_VRSN);
 	printf (UT_EXTRA_OPTS);
 	printf (UT_HOST_PORT, 'p', "123");
+	printf (UT_IPv46);
 	printf (" %s\n", "-w, --warning=THRESHOLD");
 	printf ("    %s\n", _("Offset to result in warning status (seconds)"));
 	printf (" %s\n", "-c, --critical=THRESHOLD");
@@ -881,5 +882,5 @@ print_usage(void)
 	printf ("%s\n", _("WARNING: check_ntp is deprecated. Please use check_ntp_peer or"));
 	printf ("%s\n\n", _("check_ntp_time instead."));
 	printf ("%s\n", _("Usage:"));
-	printf(" %s -H <host> [-w <warn>] [-c <crit>] [-j <warn>] [-k <crit>] [-v verbose]\n", progname);
+	printf(" %s -H <host> [-w <warn>] [-c <crit>] [-j <warn>] [-k <crit>] [-4|-6] [-v verbose]\n", progname);
 }
diff --git a/plugins/check_ntp_peer.c b/plugins/check_ntp_peer.c
index 50cb7b1..b59c056 100644
--- a/plugins/check_ntp_peer.c
+++ b/plugins/check_ntp_peer.c
@@ -660,6 +660,7 @@ void print_help(void){
 	print_usage();
 	printf (UT_HELP_VRSN);
 	printf (UT_EXTRA_OPTS);
+	printf (UT_IPv46);
 	printf (UT_HOST_PORT, 'p', "123");
 	printf (" %s\n", "-q, --quiet");
 	printf ("    %s\n", _("Returns UNKNOWN instead of CRITICAL or WARNING if server isn't synchronized"));
@@ -716,6 +717,6 @@ void
 print_usage(void)
 {
 	printf ("%s\n", _("Usage:"));
-	printf(" %s -H <host> [-w <warn>] [-c <crit>] [-W <warn>] [-C <crit>]\n", progname);
+	printf(" %s -H <host> [-4|-6] [-w <warn>] [-c <crit>] [-W <warn>] [-C <crit>]\n", progname);
 	printf("       [-j <warn>] [-k <crit>] [-v verbose]\n");
 }
diff --git a/plugins/check_ntp_time.c b/plugins/check_ntp_time.c
index d543d6b..86530fe 100644
--- a/plugins/check_ntp_time.c
+++ b/plugins/check_ntp_time.c
@@ -602,6 +602,7 @@ void print_help(void){
 	print_usage();
 	printf (UT_HELP_VRSN);
 	printf (UT_EXTRA_OPTS);
+	printf (UT_IPv46);
 	printf (UT_HOST_PORT, 'p', "123");
 	printf (" %s\n", "-q, --quiet");
 	printf ("    %s\n", _("Returns UNKNOWN instead of CRITICAL if offset cannot be found"));
@@ -635,6 +636,6 @@ void
 print_usage(void)
 {
 	printf ("%s\n", _("Usage:"));
-	printf(" %s -H <host> [-w <warn>] [-c <crit>] [-v verbose]\n", progname);
+	printf(" %s -H <host> [-4|-6] [-w <warn>] [-c <crit>] [-v verbose]\n", progname);
 }
 
diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c
index 69edae7..8b0769f 100644
--- a/plugins/check_pgsql.c
+++ b/plugins/check_pgsql.c
@@ -475,6 +475,6 @@ void
 print_usage (void)
 {
 	printf ("%s\n", _("Usage:"));
-	printf ("%s [-H <host>] [-P <port>] [-c <critical time>] [-w <warning time>]\n", progname);
+	printf ("%s [-H <host>] [-4|-6] [-P <port>] [-c <critical time>] [-w <warning time>]\n", progname);
 	printf (" [-t <timeout>] [-d <database>] [-l <logname>] [-p <password>]\n");
 }
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c
index 4d63394..6e8a5fc 100644
--- a/plugins/check_ssh.c
+++ b/plugins/check_ssh.c
@@ -307,6 +307,6 @@ void
 print_usage (void)
 {
   printf ("%s\n", _("Usage:"));
-	printf ("%s [-46] [-t <timeout>] [-r <remote version>] [-p <port>] <host>\n", progname);
+	printf ("%s  [-4|-6] [-t <timeout>] [-r <remote version>] [-p <port>] <host>\n", progname);
 }
 





More information about the Commits mailing list