Code

print_help and print_usage() cleanup
authorBenoit Mortier <opensides@users.sourceforge.net>
Fri, 3 Dec 2004 23:02:04 +0000 (23:02 +0000)
committerBenoit Mortier <opensides@users.sourceforge.net>
Fri, 3 Dec 2004 23:02:04 +0000 (23:02 +0000)
other misc cleanups

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@996 f882894a-f735-0410-b71e-b25c423dba1c

27 files changed:
plugins/check_dig.c
plugins/check_disk.c
plugins/check_dns.c
plugins/check_dummy.c
plugins/check_fping.c
plugins/check_game.c
plugins/check_hpjd.c
plugins/check_http.c
plugins/check_ide-smart.c
plugins/check_ldap.c
plugins/check_mrtg.c
plugins/check_mrtgtraf.c
plugins/check_nagios.c
plugins/check_nt.c
plugins/check_nwstat.c
plugins/check_overcr.c
plugins/check_pgsql.c
plugins/check_procs.c
plugins/check_radius.c
plugins/check_real.c
plugins/check_smtp.c
plugins/check_snmp.c
plugins/check_swap.c
plugins/check_tcp.c
plugins/check_time.c
plugins/check_udp.c
plugins/check_ups.c

index 5bed80d4a3bbd73cfe8218505a0f6c8476f2be36..8f88316faa21c4ef837fd459f0a97638f94f8ff0 100644 (file)
@@ -20,7 +20,7 @@
 
 const char *progname = "check_dig";
 const char *revision = "$Revision$";
-const char *copyright = "2002-2003";
+const char *copyright = "2002-2004";
 const char *email = "nagiosplug-devel@lists.sourceforge.net";
 
 #include "common.h"
@@ -221,7 +221,7 @@ process_arguments (int argc, char **argv)
                        print_help ();
                        exit (STATE_OK);
                case 'V':                                                                       /* version */
-                       print_revision (progname, "$Revision$");
+                       print_revision (progname, revision);
                        exit (STATE_OK);
                case 'H':                                                                       /* hostname */
                        if (is_host (optarg)) {
@@ -318,7 +318,7 @@ print_help (void)
        printf ("Copyright (c) 2000 Karl DeBisschop <kdebisschop@users.sourceforge.net>\n");
        printf (COPYRIGHT, copyright, email);
 
-       printf (_("Test the DNS service on the specified host using dig\n"));
+       printf (_("Test the DNS service on the specified host using dig\n\n"));
 
        print_usage ();
 
index 109420a110f632300aea146bfec0b768000a9f5e..71a6807957079310316c1f1cf0d95645857d876d 100644 (file)
@@ -21,7 +21,7 @@
 const char *progname = "check_disk";
 const char *program_name = "check_disk";       // Required for coreutils libs
 const char *revision = "$Revision$";
-const char *copyright = "1999-2003";
+const char *copyright = "1999-2004";
 const char *email = "nagiosplug-devel@lists.sourceforge.net";
 
 #include "common.h"
@@ -578,7 +578,7 @@ print_help (void)
 
        printf (_("\
 This plugin checks the amount of used disk space on a mounted file system\n\
-and generates an alert if free space is less than one of the threshold values."));
+and generates an alert if free space is less than one of the threshold values.\n\n"));
 
        print_usage ();
 
@@ -638,5 +638,5 @@ print_usage (void)
 {
        printf ("\
 Usage: %s -w limit -c limit [-p path | -x device] [-t timeout] [-m] [-e]\n\
-          [-v] [-q]\n", progname);
+                  [-v] [-q]\n", progname);
 }
index 492fa17629b8b5dffb3697313ef0640e209d4b58..2a8f459275fbc2cf13214b0cc471a36be6db26dc 100644 (file)
@@ -395,6 +395,12 @@ print_help (void)
        printf ("Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>\n");
        printf (COPYRIGHT, copyright, email);
 
+       printf (_("\
+This plugin uses the nslookup program to obtain the IP address\n\
+for the given host/domain query.  A optional DNS server to use may\n\
+be specified.  If no DNS server is specified, the default server(s)\n\
+specified in /etc/resolv.conf will be used.\n\n"));
+
        print_usage ();
 
        printf (_(UT_HELP_VRSN));
@@ -411,12 +417,6 @@ print_help (void)
 
        printf (_(UT_TIMEOUT), DEFAULT_SOCKET_TIMEOUT);
 
-       printf (_("\n\
-This plugin uses the nslookup program to obtain the IP address\n\
-for the given host/domain query.  A optional DNS server to use may\n\
-be specified.  If no DNS server is specified, the default server(s)\n\
-specified in /etc/resolv.conf will be used.\n"));
-
        printf (_(UT_SUPPORT));
 }
 
index e0c38d322f962026cc56e119823a58608874d381..2dbbaec843b0bc38ee1f8110338ea6f71bf815b0 100644 (file)
@@ -91,14 +91,14 @@ print_help (void)
        printf ("Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>\n");
        printf (COPYRIGHT, copyright, email);
 
+       printf (_("\
+This plugin will simply return the state corresponding to the numeric value\n\
+of the <state> argument with optional text.\n\n"));
+
        print_usage ();
 
        printf (_(UT_HELP_VRSN));
 
-       printf (_("\n\
-This plugin will simply return the state corresponding to the numeric value\n\
-of the <state> argument with optional text.\n"));
-
        printf (_(UT_SUPPORT));
 }
 
index 0b23f79e993cf1be22b41a6baddfbbccbe191123..ce62a7c86104c845c471902bad51ce551d3828f3 100644 (file)
@@ -356,15 +356,15 @@ void
 print_help (void)
 {
 
-       print_revision (progname, "$Revision$");
+       print_revision (progname, revision);
 
        printf ("Copyright (c) 1999 Didi Rieder <adrieder@sbox.tu-graz.ac.at>\n");
        printf (COPYRIGHT, copyright, email);
 
        printf (_("\
-This plugin will use the /bin/fping command (from saint) to ping the\n\
-specified host for a fast check if the host is alive. Note that it is\n\
-necessary to set the suid flag on fping.\n\n"));
+This plugin will use the /bin/fping command to ping the specified host\n\
+for a fast check if the host is alive.\n\
+Note that it is necessary to set the suid flag on fping.\n\n"));
 
        print_usage ();
 
index 9b13d94b5843db49dd14a50a352efb900fb4b813..c0f9a47dc8a92eb8be04c27dde459b3e21425844 100644 (file)
@@ -302,7 +302,7 @@ print_help (void)
        printf ("Copyright (c) 1999 Ian Cass, Knowledge Matters Limited\n");
        printf (_(COPYRIGHT), copyright, email);
 
-       printf (_("This plugin tests %s connections with the specified host."), progname);
+       printf (_("This plugin tests game server connections with the specified host."), progname);
 
        print_usage ();
 
@@ -334,7 +334,7 @@ print_usage (void)
 {
        printf ("\
 Usage: %s <game> <ip_address> [-p port] [-gf game_field] [-mf map_field]\n\
-          [-pf ping_field]\n", progname);
+                  [-pf ping_field]\n", progname);
 }
 
 /******************************************************************************
index 816ce19bc8e4c9682831fe879ff1a322c0b431a1..678d5c80c72c119acfde15f5b660dcc0b9e3b95c 100644 (file)
@@ -398,6 +398,5 @@ Net-snmp must be installed on the computer running the plugin.\n\n"));
 void
 print_usage (void)
 {
-       printf (_("\
-Usage: %s -H host [-C community]\n"), progname);
+       printf ("Usage: %s -H host [-C community]\n"), progname);
 }
index f33402684daf566935551556a7d93b108647fff7..3ff834b3193bc3f31684734bb8495b390bf40cd0 100644 (file)
@@ -21,7 +21,7 @@
 
 const char *progname = "check_http";
 const char *revision = "$Revision$";
-const char *copyright = "1999-2001";
+const char *copyright = "1999-2004";
 const char *email = "nagiosplug-devel@lists.sourceforge.net";
 
 #include "common.h"
@@ -1376,7 +1376,7 @@ print_help (void)
 This plugin tests the HTTP service on the specified host. It can test\n\
 normal (http) and secure (https) servers, follow redirects, search for\n\
 strings and regular expressions, check connection times, and report on\n\
-certificate expiration times.\n"));
+certificate expiration times.\n\n"));
 
        print_usage ();
 
@@ -1492,9 +1492,9 @@ print_usage (void)
 {
        printf (_("\
 Usage: %s -H <vhost> | -I <IP-address>) [-u <uri>] [-p <port>]\n\
-          [-w <warn time>] [-c <critical time>] [-t <timeout>] [-L]\n\
-          [-a auth] [-f <ok | warn | critcal | follow>] [-e <expect>]\n\
-          [-s string] [-l] [-r <regex> | -R <case-insensitive regex>]\n\
-          [-P string] [-m min_pg_size] [-4|-6] [-N] [-M <age>] [-A string]\n\
-          [-k string]\n"), progname);
+                  [-w <warn time>] [-c <critical time>] [-t <timeout>] [-L]\n\
+                  [-a auth] [-f <ok | warn | critcal | follow>] [-e <expect>]\n\
+                  [-s string] [-l] [-r <regex> | -R <case-insensitive regex>]\n\
+                  [-P string] [-m min_pg_size] [-4|-6] [-N] [-M <age>]\n\
+                                                                       [-A string] [-k string]\n"), progname);
 }
index 9ebef6cd6fdc856132b0f43216da9d2c85239349..1c0af310873303ae2acb559153bd0570ba3707ac 100644 (file)
@@ -146,6 +146,125 @@ enum SmartCommand
        };
 
 
+int
+main (int argc, char *argv[]) 
+{
+       char *device = NULL;
+       int command = -1;
+       int o, longindex;
+       int retval = 0;
+
+       thresholds_t thresholds;
+       values_t values;
+       int fd;
+
+       static struct option longopts[] = { 
+               {"device", required_argument, 0, 'd'}, 
+               {"immediate", no_argument, 0, 'i'}, 
+               {"quiet-check", no_argument, 0, 'q'}, 
+               {"auto-on", no_argument, 0, '1'}, 
+               {"auto-off", no_argument, 0, '0'}, 
+               {"net-saint", no_argument, 0, 'n'}, 
+               {"help", no_argument, 0, 'h'}, 
+               {"version", no_argument, 0, 'V'}, {0, 0, 0, 0} 
+       };
+
+       setlocale (LC_ALL, "");
+       bindtextdomain (PACKAGE, LOCALEDIR);
+       textdomain (PACKAGE);
+
+       while (1) {
+               
+               o = getopt_long (argc, argv, "+d:iq10nhV", longopts, &longindex);
+               
+               if (o == -1 || o == EOF)
+                       break;
+
+               switch (o) {
+               case 'd':
+                       device = optarg;
+                       break;
+               case 'q':
+                       command = 3;
+                       break;
+               case 'i':
+                       command = 2;
+                       break;
+               case '1':
+                       command = 1;
+                       break;
+               case '0':
+                       command = 0;
+                       break;
+               case 'n':
+                       command = 4;
+                       break;
+               case 'h':
+                       print_help ();
+                       return STATE_OK;
+               case 'V':
+                       print_revision (progname, revision);
+                       return STATE_OK;
+               default:
+                       printf (_("%s: Unknown argument: %s\n\n"), progname, optarg);
+                       print_usage ();
+                       exit (STATE_UNKNOWN);
+               }
+
+               if (optind < argc) {
+                       device = argv[optind];
+               }
+
+               if (!device) {
+                       show_help ();
+                       show_version ();
+                       return -1;
+               }
+
+               fd = open (device, O_RDONLY);
+
+               if (fd < 0) {
+                       printf (_("CRITICAL - Couldn't open device: %s\n"), strerror (errno));
+                       return 2;
+               }
+
+               if (smart_cmd_simple (fd, SMART_CMD_ENABLE, 0, TRUE)) {
+                       printf (_("CRITICAL - SMART_CMD_ENABLE\n"));
+                       return 2;
+               }
+
+               switch (command) {
+               case 0:
+                       retval = smart_cmd_simple (fd, SMART_CMD_AUTO_OFFLINE, 0, TRUE);
+                       break;
+               case 1:
+                       retval = smart_cmd_simple (fd, SMART_CMD_AUTO_OFFLINE, 0xF8, TRUE);
+                       break;
+               case 2:
+                       retval = smart_cmd_simple (fd, SMART_CMD_IMMEDIATE_OFFLINE, 0, TRUE);
+                       break;
+               case 3:
+                       smart_read_values (fd, &values);
+                       smart_read_thresholds (fd, &thresholds);
+                       retval = values_not_passed (&values, &thresholds);
+                       break;
+               case 4:
+                       smart_read_values (fd, &values);
+                       smart_read_thresholds (fd, &thresholds);
+                       retval = net_saint (&values, &thresholds);
+                       break;
+               default:
+                       smart_read_values (fd, &values);
+                       smart_read_thresholds (fd, &thresholds);
+                       print_values (&values, &thresholds);
+                       break;
+               }
+               close (fd);
+       }
+       return retval;
+}
+
+
 
 char *
 get_offline_text (int status) 
@@ -371,19 +490,14 @@ smart_read_thresholds (int fd, thresholds_t * thresholds)
 
 
 void
-show_version () 
+print_help () 
 {
-       printf ("check_ide-smart v.1 - FREE Software with NO WARRANTY\n");
-       printf ("Nagios feature - Robert Dale <rdale@digital-mission.com>\n");
+       print_revision (progname, revision);
+
+       printf ("Nagios feature - 1999 Robert Dale <rdale@digital-mission.com>\n");
        printf ("(C) 1999 Ragnar Hojland Espinosa <ragnar@lightside.dhis.org>\n");
        printf (COPYRIGHT, copyright, email);
-}
-
-
-
-void
-show_help () 
-{
+       
        printf (_("\
 Usage: %s [DEVICE] [OPTION]\n\
  -d, --device=DEVICE\n\
@@ -402,120 +516,8 @@ Usage: %s [DEVICE] [OPTION]\n\
 
 
 
-int
-main (int argc, char *argv[]) 
+void
+print_usage (void)
 {
-       char *device = NULL;
-       int command = -1;
-       int o, longindex;
-       int retval = 0;
-
-       thresholds_t thresholds;
-       values_t values;
-       int fd;
-
-       static struct option longopts[] = { 
-               {"device", required_argument, 0, 'd'}, 
-               {"immediate", no_argument, 0, 'i'}, 
-               {"quiet-check", no_argument, 0, 'q'}, 
-               {"auto-on", no_argument, 0, '1'}, 
-               {"auto-off", no_argument, 0, '0'}, 
-               {"net-saint", no_argument, 0, 'n'}, 
-               {"help", no_argument, 0, 'h'}, 
-               {"version", no_argument, 0, 'V'}, {0, 0, 0, 0} 
-       };
-
-       setlocale (LC_ALL, "");
-       bindtextdomain (PACKAGE, LOCALEDIR);
-       textdomain (PACKAGE);
-
-       while (1) {
-               
-               o = getopt_long (argc, argv, "+d:iq10nhV", longopts, &longindex);
-               
-               if (o == -1 || o == EOF)
-                       break;
-
-               switch (o) {
-               case 'd':
-                       device = optarg;
-                       break;
-               case 'q':
-                       command = 3;
-                       break;
-               case 'i':
-                       command = 2;
-                       break;
-               case '1':
-                       command = 1;
-                       break;
-               case '0':
-                       command = 0;
-                       break;
-               case 'n':
-                       command = 4;
-                       break;
-               case 'h':
-                       show_help ();
-                       return 0;
-               case 'V':
-                       show_version ();
-                       return 0;
-               default:
-                       printf (_("%s: Unknown argument: %s\n\n"), progname, optarg);
-                       print_usage ();
-                       exit (STATE_UNKNOWN);
-               }
-
-               if (optind < argc) {
-                       device = argv[optind];
-               }
-
-               if (!device) {
-                       show_help ();
-                       show_version ();
-                       return -1;
-               }
-
-               fd = open (device, O_RDONLY);
-
-               if (fd < 0) {
-                       printf (_("CRITICAL - Couldn't open device: %s\n"), strerror (errno));
-                       return 2;
-               }
-
-               if (smart_cmd_simple (fd, SMART_CMD_ENABLE, 0, TRUE)) {
-                       printf (_("CRITICAL - SMART_CMD_ENABLE\n"));
-                       return 2;
-               }
-
-               switch (command) {
-               case 0:
-                       retval = smart_cmd_simple (fd, SMART_CMD_AUTO_OFFLINE, 0, TRUE);
-                       break;
-               case 1:
-                       retval = smart_cmd_simple (fd, SMART_CMD_AUTO_OFFLINE, 0xF8, TRUE);
-                       break;
-               case 2:
-                       retval = smart_cmd_simple (fd, SMART_CMD_IMMEDIATE_OFFLINE, 0, TRUE);
-                       break;
-               case 3:
-                       smart_read_values (fd, &values);
-                       smart_read_thresholds (fd, &thresholds);
-                       retval = values_not_passed (&values, &thresholds);
-                       break;
-               case 4:
-                       smart_read_values (fd, &values);
-                       smart_read_thresholds (fd, &thresholds);
-                       retval = net_saint (&values, &thresholds);
-                       break;
-               default:
-                       smart_read_values (fd, &values);
-                       smart_read_thresholds (fd, &thresholds);
-                       print_values (&values, &thresholds);
-                       break;
-               }
-               close (fd);
-       }
-       return retval;
+       printf ("Usage: %s \n"), progname);
 }
index 9664c0fb5c211cc10c22f9e23a547282b6647cd8..dfdd837476f6d27eb4868a342081fddd09e65a51 100644 (file)
@@ -277,8 +277,6 @@ validate_arguments ()
 
 
 
-
-
 void
 print_help (void)
 {
@@ -334,7 +332,8 @@ print_usage (void)
 {
        printf ("\
 Usage: %s -H <host> -b <base_dn> [-p <port>] [-a <attr>] [-D <binddn>]\n\
-         [-P <password>] [-w <warn_time>] [-c <crit_time>] [-t timeout]%s\n",
+                  [-P <password>] [-w <warn_time>] [-c <crit_time>]\n\
+                                                                       [-t timeout]%s\n",
 //(Note: all times are in seconds.)\n",
                progname,
 #ifdef HAVE_LDAP_SET_OPTION
index 5dfee7201ad968a1693296d453d031f049b7dad7..cf3cc851e206da4f28b638bf4584fdda94c43bc4 100644 (file)
@@ -316,7 +316,7 @@ print_help (void)
 
        printf(_("\
 This plugin will check either the average or maximum value of one of the\n\
-two variables recorded in an MRTG log file.\n"));
+two variables recorded in an MRTG log file.\n\n"));
 
        print_usage ();
 
@@ -377,5 +377,6 @@ print_usage (void)
 {
        printf ("\
 Usage: %s -F log_file -a <AVG | MAX> -v variable -w warning -c critical\n\
-         [-l label] [-u units] [-e expire_minutes] [-t timeout] [-v]\n", progname);
+                  [-l label] [-u units] [-e expire_minutes] [-t timeout]\n\
+                                                                       [-v]\n", progname);
 }
index 9b408a4244ebf5e018aab55a3bfa261610ad091b..0f7afbc8ec4643f2ee392393173bc36b5ac83ca2 100644 (file)
@@ -321,6 +321,14 @@ print_help (void)
        printf ("Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>\n");
        printf (COPYRIGHT, copyright, email);
 
+       printf (_("\n\
+This plugin will check the incoming/outgoing transfer rates of a router,\n\
+switch, etc recorded in an MRTG log.  If the newest log entry is older\n\
+than <expire_minutes>, a WARNING status is returned. If either the\n\
+incoming or outgoing rates exceed the <icl> or <ocl> thresholds (in\n\
+Bytes/sec), a CRITICAL status results.  If either of the rates exceed\n\
+the <iwl> or <owl> thresholds (in Bytes/sec), a WARNING status results.\n\n"));
+
        print_usage ();
 
        printf (_(UT_HELP_VRSN));
@@ -337,14 +345,6 @@ print_help (void)
  -c, --critical\n\
    Critical threshold pair \"<incoming>,<outgoing>\"\n"));
 
-       printf (_("\n\
-This plugin will check the incoming/outgoing transfer rates of a router,\n\
-switch, etc recorded in an MRTG log.  If the newest log entry is older\n\
-than <expire_minutes>, a WARNING status is returned. If either the\n\
-incoming or outgoing rates exceed the <icl> or <ocl> thresholds (in\n\
-Bytes/sec), a CRITICAL status results.  If either of the rates exceed\n\
-the <iwl> or <owl> thresholds (in Bytes/sec), a WARNING status results.\n\n"));
-
        printf (_("Notes:\n\
 - MRTG stands for Multi Router Traffic Grapher. It can be downloaded from\n\
   http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html\n\
@@ -363,6 +363,6 @@ void
 print_usage (void)
 {
        printf ("\
-Usage: %s -F <log_file> -a <AVG | MAX> -v <variable> -w <warning_pair> -c <critical_pair>\n\
-          [-e expire_minutes] [-t timeout] [-v]\n", progname);
+Usage: %s -F <log_file> -a <AVG | MAX> -v <variable> -w <warning_pair>\n\
+                      -c <critical_pair> [-e expire_minutes] [-t timeout] [-v]\n", progname);
 }
index 8a10c4a7844a3a4c71bbc6f6ac9ae7d640063738..29abc2a8e22b90c6621c861b7e97c17f6de335c3 100644 (file)
@@ -276,7 +276,7 @@ This plugin attempts to check the status of the Nagios process on the local\n\
 machine. The plugin will check to make sure the Nagios status log is no older\n\
 than the number of minutes specified by the <expire_minutes> option.  It also\n\
 uses the /bin/ps command to check for a process matching whatever you specify\n\
-by the <process_string> argument.\n"));
+by the <process_string> argument.\n\n"));
 
        print_usage ();
 
index 67c3017e1ec4492a4256b9653f9f2a7ed631fd92..4826d68722dda72c89ebea4d1f0ecfb7a8659450 100644 (file)
@@ -608,11 +608,15 @@ void preparelist(char *string) {
 void print_help(void)
 {
        print_revision(progname,revision);
-       printf (_("\
-Copyright (c) 2000 Yves Rubin (rubiyz@yahoo.com)\n\n\
-This plugin collects data from the NSClient service running on a\n\
-Windows NT/2000/XP server.\n\n"));
+       
+       printf (_("Copyright (c) 2000 Yves Rubin (rubiyz@yahoo.com)\n"));
+       printf (COPYRIGHT, copyright, email);
+       
+       printf (_("This plugin collects data from the NSClient service running on a\n\
+Windows NT/2000/XP/2003 server.\n\n"));
+
        print_usage();
+       
   printf (_("\nOptions:\n\
 -H, --hostname=HOST\n\
   Name of the host to check\n\
@@ -629,8 +633,8 @@ Windows NT/2000/XP server.\n\n"));
 -h, --help\n\
   Print this help screen\n\
 -V, --version\n\
-  Print version information\n"),
-               PORT, DEFAULT_SOCKET_TIMEOUT);
+  Print version information\n"), PORT, DEFAULT_SOCKET_TIMEOUT);
+       
   printf (_("\
 -v, --variable=STRING\n\
   Variable to check.  Valid variables are:\n"));
@@ -684,5 +688,5 @@ void print_usage(void)
 {
        printf("\
 Usage: %s -H host -v variable [-p port] [-w warning] [-c critical]\n\
-          [-l params] [-d SHOWALL] [-t timeout]\n", progname);
+                  [-l params] [-d SHOWALL] [-t timeout]\n", progname);
 }
index b791640f5e1d849efb5a7949586fd69699ed0140..4dffba3ee919bf8f95fd9357b6f2961d6e5a74b1 100644 (file)
@@ -908,8 +908,8 @@ void print_help(void)
        printf (COPYRIGHT, copyright, email);
 
        printf (_("\
-Usage: %s This plugin attempts to contact the MRTGEXT NLM running\n\
-on a Novell server to gather the requested system information.\n\n"),
+This plugin attempts to contact the MRTGEXT NLM running on a\n\
+Novell server to gather the requested system information.\n\n"),
                progname);
 
        print_usage();
@@ -989,5 +989,5 @@ void print_usage(void)
 {
        printf ("\
 Usage: %s -H host [-p port] [-v variable] [-w warning] [-c critical]\n\
-          [-t timeout].\n", progname);
+                  [-t timeout].\n", progname);
 }
index 2ebf62e1e4f9c3b8d8a3e115792ce1e4c0e7a03f..8fb1ef409e4da8836409ae05452c1e1a1cb12aa5 100644 (file)
@@ -465,5 +465,5 @@ print_usage (void)
 {
        printf ("\
 Usage: %s -H host [-p port] [-v variable] [-w warning] [-c critical]\n\
-          [-t timeout]\n", progname);
+                  [-t timeout]\n", progname);
 }
index 53f9e96caca7d26ce4dd5ac71ffeab03c8c942b0..a00257127ddc82cbd9e71b3da798e73d1a9f981a 100644 (file)
@@ -391,7 +391,7 @@ print_help (void)
 
        print_revision (progname, revision);
 
-       printf (_(COPYRIGHT), copyright, email);
+       printf (COPYRIGHT, copyright, email);
 
        printf (_("Test whether a PostgreSQL Database is accepting connections.\n\n"));
 
@@ -443,5 +443,5 @@ print_usage (void)
 {
        printf ("\
 Usage: %s [-H <host>] [-P <port>] [-c <critical time>] [-w <warning time>]\n\
-          [-t <timeout>] [-d <database>] [-l <logname>] [-p <password>]\n", progname);
+                  [-t <timeout>] [-d <database>] [-l <logname>] [-p <password>]\n", progname);
 }
index 7770ddada766922b5e3e7f5d1895da16c58eba15..5742b72799545cfd583841f9a07ffc1d96753b58 100644 (file)
@@ -751,6 +751,6 @@ print_usage (void)
 {
        printf ("\
 Usage: %s -w <range> -c <range> [-m metric] [-s state] [-p ppid]\n\
-          [-u user] [-r rss] [-z vsz] [-P %%cpu] [-a argument-array]\n\
-          [-C command] [-t timeout] [-v]\n", progname);
+                  [-u user] [-r rss] [-z vsz] [-P %%cpu] [-a argument-array]\n\
+                  [-C command] [-t timeout] [-v]\n", progname);
 }
index 90653a27e9b5ed2d9728f1b1c33acbd9987d8b5b..bdb9b7aac83b8fa0412c4c8ad5cb52f4e3052129 100644 (file)
@@ -26,6 +26,7 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net";
 #include "common.h"
 #include "utils.h"
 #include "netutils.h"
+
 #include <radiusclient.h>
 
 int process_arguments (int, char **);
@@ -335,5 +336,5 @@ print_usage (void)
 {
        printf ("\
 Usage: %s -H host -F config_file -u username -p password [-n nas-id] [-P port]\n\
-          [-t timeout] [-r retries] [-e expect]\n", progname);
+                  [-t timeout] [-r retries] [-e expect]\n", progname);
 }
index 9fad2a8342505a156adcee8201bf659c351e7d6b..f843172628ae764ecc64210693aa8feead1158fb 100644 (file)
@@ -438,5 +438,5 @@ print_usage (void)
 {
        printf ("\
 Usage: %s -H host [-e expect] [-p port] [-w warn] [-c crit]\n\
-          [-t timeout] [-v]\n", progname);
+                  [-t timeout] [-v]\n", progname);
 }
index ac20853574067c2a48e7dd4d8f908422b8b92b01..d8346426cf331a2b4df9958e57bbf4b0ecdbbbf6 100644 (file)
@@ -422,8 +422,7 @@ print_help (void)
        printf ("Copyright (c) 1999-2001 Ethan Galstad <nagios@nagios.org>\n");
        printf (COPYRIGHT, copyright, email);
 
-       printf(_("\
-This plugin will attempt to open an SMTP connection with the host.\n\n"));
+       printf(_("This plugin will attempt to open an SMTP connection with the host.\n\n"));
 
        print_usage ();
 
@@ -468,5 +467,5 @@ print_usage (void)
 {
        printf ("\
 Usage: %s -H host [-p port] [-e expect] [-C command] [-f from addr]\n\
-          [-w warn] [-c crit] [-t timeout] [-n] [-v] [-4|-6]\n", progname);
+                  [-w warn] [-c crit] [-t timeout] [-n] [-v] [-4|-6]\n", progname);
 }
index fa4f56c542547f942c0edaad56222bfb5d0c7b68..18b7f2f4df6ab50f5acf5d9ab5aab1e6dca026c0 100644 (file)
@@ -842,7 +842,7 @@ print_help (void)
 {
        print_revision (progname, revision);
 
-       printf (_(COPYRIGHT), copyright, email);
+       printf (COPYRIGHT, copyright, email);
 
        printf (_("\
 Check status of remote machines and obtain sustem information via SNMP\n\n"));
@@ -950,9 +950,9 @@ print_usage (void)
 {
        printf ("\
 Usage: %s -H <ip_address> -o <OID> [-w warn_range] [-c crit_range] \n\
-          [-C community] [-s string] [-r regex] [-R regexi] [-t timeout]\n\
-          [-l label] [-u units] [-p port-number] [-d delimiter]\n\
-          [-D output-delimiter] [-m miblist] [-P snmp version]\n\
-          [-L seclevel] [-U secname] [-a authproto] [-A authpasswd]\n\
-          [-X privpasswd]\n", progname);
+                  [-C community] [-s string] [-r regex] [-R regexi] [-t timeout]\n\
+                  [-l label] [-u units] [-p port-number] [-d delimiter]\n\
+                  [-D output-delimiter] [-m miblist] [-P snmp version]\n\
+                  [-L seclevel] [-U secname] [-a authproto] [-A authpasswd]\n\
+                  [-X privpasswd]\n", progname);
 }
index 3a3ec35c7bd695e452c4a1df5e20e0db58ecc383..2e5f5c7c3825c2ca5c4d75d19beab762adb9b36a 100644 (file)
@@ -479,7 +479,7 @@ print_help (void)
 
        printf (_(COPYRIGHT), copyright, email);
 
-       printf (_("Check swap space on local server.\n\n"));
+       printf (_("Check swap space on local machine.\n\n"));
 
        print_usage ();
 
@@ -514,7 +514,7 @@ On AIX, if -a is specified, uses lsps -a, otherwise uses lsps -s.\n"));
 void
 print_usage (void)
 {
-       printf ("Usage:\n\
- %s [-av] -w <percent_free>%% -c <percent_free>%%\n\
- %s [-av] -w <bytes_free> -c <bytes_free>\n", progname, progname);
+       printf ("\
      Usage: %s [-av] -w <percent_free>%% -c <percent_free>%%\n\
        %s [-av] -w <bytes_free> -c <bytes_free>\n", progname, progname);
 }
index b2066c7af9b05102aa1901fea285c752c43c06e7..93ba344609d59a5aa3f7f85eb18a6202d3c42c29 100644 (file)
@@ -739,8 +739,8 @@ print_help (void)
 {
        print_revision (progname, revision);
 
-       printf (_("Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>\n"));
-       printf (_(COPYRIGHT), copyright, email);
+       printf ("Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>\n"));
+       printf (COPYRIGHT, copyright, email);
 
        printf (_("This plugin tests %s connections with the specified host.\n\n"),
                SERVICE);
@@ -795,8 +795,8 @@ print_usage (void)
 {
        printf ("\
 Usage: %s -H host -p port [-w <warning time>] [-c <critical time>]\n\
-          [-s <send string>] [-e <expect string>] [-q <quit string>]\n\
-          [-m <maximum bytes>] [-d <delay>] [-t <timeout seconds>]\n\
-          [-r <refuse state>] [-v] [-4|-6] [-j] [-D <days to cert expiry>]\n\
-          [-S <use SSL>]\n", progname);
+                  [-s <send string>] [-e <expect string>] [-q <quit string>]\n\
+                  [-m <maximum bytes>] [-d <delay>] [-t <timeout seconds>]\n\
+                  [-r <refuse state>] [-v] [-4|-6] [-j] [-D <days to cert expiry>]\n\
+                  [-S <use SSL>]\n", progname);
 }
index 5d07f545a99268aa11845767a147dc93a2a7e4c0..b2e53745849fd975989e852d6c3557420f6330e4 100644 (file)
@@ -326,8 +326,7 @@ print_help (void)
        printf ("Copyright (c) 1999 Ethan Galstad\n");
        printf (COPYRIGHT, copyright, email);
 
-       printf (_("\
-This plugin will check the time on the specified host.\n\n"));
+       printf (_("This plugin will check the time on the specified host.\n\n"));
 
        print_usage ();
 
@@ -359,5 +358,5 @@ print_usage (void)
 {
        printf ("\
 Usage: %s -H <host_address> [-p port] [-u] [-w variance] [-c variance]\n\
-          [-W connect_time] [-C connect_time] [-t timeout]\n", progname);
+                  [-W connect_time] [-C connect_time] [-t timeout]\n", progname);
 }
index ea91f417a25223dde3738763211fa8e78e9bdda6..e446b933aa9c10de1542c8aafe36de22696eedef 100644 (file)
@@ -264,5 +264,5 @@ print_usage (void)
 {
        printf ("\
 Usage: %s -H <host_address> [-p port] [-w warn_time] [-c crit_time]\n\
-          [-e expect] [-s send] [-t to_sec] [-v]\n", progname);
+                  [-e expect] [-s send] [-t to_sec] [-v]\n", progname);
 }
index 23fb8d2ba0798ca186d6c60093a83cdf353178b4..8383b09333300e8f668303288f2175ba9ebf8fea 100644 (file)
@@ -592,7 +592,6 @@ print_help (void)
        printf ("Copyright (c) 2000 Tom Shields");
        printf ("Copyright (c) 2004 Alain Richard <alain.richard@equation.fr>\n");
        printf ("Copyright (c) 2004 Arnaud Quette <arnaud.quette@mgeups.com>\n");
-
        printf (COPYRIGHT, copyright, email);
 
        printf (_("This plugin tests the UPS service on the specified host.\n\
@@ -648,5 +647,5 @@ print_usage (void)
 {
        printf ("\
 Usage: %s -H host -u ups [-p port] [-v variable]\n\
-          [-wv warn_value] [-cv crit_value] [-to to_sec] [-T]\n", progname);
+                  [-wv warn_value] [-cv crit_value] [-to to_sec] [-T]\n", progname);
 }