Răsfoiți Sursa

Making messages more consistent

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@930 f882894a-f735-0410-b71e-b25c423dba1c
Ton Voon 21 ani în urmă
părinte
comite
0c1c9f51e2

+ 1 - 1
plugins/check_by_ssh.c

@@ -297,7 +297,7 @@ process_arguments (int argc, char **argv)
 		if (c <= argc) {
 		if (c <= argc) {
 			die (STATE_UNKNOWN, _("%s: You must provide a host name\n"), progname);
 			die (STATE_UNKNOWN, _("%s: You must provide a host name\n"), progname);
 		} else if (!is_host (argv[c]))
 		} else if (!is_host (argv[c]))
-			die (STATE_UNKNOWN, _("%s: Invalid host name %s\n"), progname, argv[c]);
+			die (STATE_UNKNOWN, "%s: %s %s\n", progname, _("Invalid host name"), argv[c]);
 		hostname = argv[c++];
 		hostname = argv[c++];
 	}
 	}
 
 

+ 2 - 2
plugins/check_dig.c

@@ -321,8 +321,8 @@ print_help (void)
 
 
 	print_revision (progname, revision);
 	print_revision (progname, revision);
 
 
-	printf (_("Copyright (c) 2000 Karl DeBisschop <kdebisschop@users.sourceforge.net>\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	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\n"));
 	printf (_("Test the DNS service on the specified host using dig\n\n"));
 
 

+ 3 - 3
plugins/check_disk.c

@@ -304,7 +304,7 @@ process_arguments (int argc, char **argv)
 				break;
 				break;
 			}
 			}
 			else {
 			else {
-				usage (_("Timeout Interval must be an integer!\n"));
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			}
 			}
 		case 'w':									/* warning threshold */
 		case 'w':									/* warning threshold */
 			if (is_intnonneg (optarg)) {
 			if (is_intnonneg (optarg)) {
@@ -572,8 +572,8 @@ print_help (void)
 {
 {
 	print_revision (progname, revision);
 	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 (_("\
 	printf (_("\
 This plugin checks the amount of used disk space on a mounted file system\n\
 This plugin checks the amount of used disk space on a mounted file system\n\

+ 3 - 5
plugins/check_dns.c

@@ -331,9 +331,7 @@ process_arguments (int argc, char **argv)
 		case 'r': /* reverse server name */
 		case 'r': /* reverse server name */
 			/* TODO: Is this is_host necessary? */
 			/* TODO: Is this is_host necessary? */
 			if (is_host (optarg) == FALSE) {
 			if (is_host (optarg) == FALSE) {
-				printf (_("Invalid host name/address\n\n"));
-				print_usage ();
-				exit (STATE_UNKNOWN);
+				usage2 (_("Invalid host name/address"), optarg);
 			}
 			}
 			if (strlen (optarg) >= ADDRESS_LENGTH)
 			if (strlen (optarg) >= ADDRESS_LENGTH)
 				die (STATE_UNKNOWN, _("Input buffer overflow\n"));
 				die (STATE_UNKNOWN, _("Input buffer overflow\n"));
@@ -391,8 +389,8 @@ print_help (void)
 {
 {
 	print_revision (progname, revision);
 	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);
 
 
 	print_usage ();
 	print_usage ();
 
 

+ 2 - 2
plugins/check_dummy.c

@@ -86,8 +86,8 @@ print_help (void)
 {
 {
 	print_revision (progname, revision);
 	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);
 
 
 	print_usage ();
 	print_usage ();
 
 

+ 4 - 6
plugins/check_fping.c

@@ -80,7 +80,7 @@ main (int argc, char **argv)
 	/* run the command */
 	/* run the command */
 	child_process = spopen (command_line);
 	child_process = spopen (command_line);
 	if (child_process == NULL) {
 	if (child_process == NULL) {
-		printf (_("Unable to open pipe: %s\n"), command_line);
+		printf (_("Could not open pipe: %s\n"), command_line);
 		return STATE_UNKNOWN;
 		return STATE_UNKNOWN;
 	}
 	}
 
 
@@ -254,9 +254,7 @@ process_arguments (int argc, char **argv)
 			break;
 			break;
 		case 'H':									/* hostname */
 		case 'H':									/* hostname */
 			if (is_host (optarg) == FALSE) {
 			if (is_host (optarg) == FALSE) {
-				printf (_("Invalid host name/address\n\n"));
-				print_usage ();
-				exit (STATE_UNKNOWN);
+				usage2 (_("Invalid host name/address"), optarg);
 			}
 			}
 			server_name = strscpy (server_name, optarg);
 			server_name = strscpy (server_name, optarg);
 			break;
 			break;
@@ -362,8 +360,8 @@ 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 ("Copyright (c) 1999 Didi Rieder <adrieder@sbox.tu-graz.ac.at>\n");
+	printf (COPYRIGHT, copyright, email);
 
 
 	printf (_("\
 	printf (_("\
 This plugin will use the /bin/fping command (from saint) to ping the\n\
 This plugin will use the /bin/fping command (from saint) to ping the\n\

+ 2 - 2
plugins/check_game.c

@@ -70,7 +70,7 @@ main (int argc, char **argv)
 		printf (_("Incorrect arguments supplied\n"));
 		printf (_("Incorrect arguments supplied\n"));
 		printf ("\n");
 		printf ("\n");
 		print_revision (progname, revision);
 		print_revision (progname, revision);
-		printf (_("Copyright (c) 1999 Ian Cass, Knowledge Matters Limited\n"));
+		printf ("Copyright (c) 1999 Ian Cass, Knowledge Matters Limited\n");
 		printf (_("License: GPL\n"));
 		printf (_("License: GPL\n"));
 		printf ("\n");
 		printf ("\n");
 		return STATE_UNKNOWN;
 		return STATE_UNKNOWN;
@@ -91,7 +91,7 @@ main (int argc, char **argv)
 	/* run the command */
 	/* run the command */
 	fp = spopen (command_line);
 	fp = spopen (command_line);
 	if (fp == NULL) {
 	if (fp == NULL) {
-		printf (_("Error - Could not open pipe: %s\n"), command_line);
+		printf (_("Could not open pipe: %s\n"), command_line);
 		return STATE_UNKNOWN;
 		return STATE_UNKNOWN;
 	}
 	}
 
 

+ 4 - 4
plugins/check_hpjd.c

@@ -321,7 +321,7 @@ process_arguments (int argc, char **argv)
 				address = strscpy(address, optarg) ;
 				address = strscpy(address, optarg) ;
 			}
 			}
 			else {
 			else {
-				usage (_("Invalid host name\n"));
+				usage2 (_("Invalid host name"), optarg);
 			}
 			}
 			break;
 			break;
 		case 'C':									/* community */
 		case 'C':									/* community */
@@ -344,7 +344,7 @@ process_arguments (int argc, char **argv)
 			address = argv[c++];
 			address = argv[c++];
 		}
 		}
 		else {
 		else {
-			usage (_("Invalid host name"));
+			usage2 (_("Invalid host name"), argv[c]);
 		}
 		}
 	}
 	}
 	
 	
@@ -378,8 +378,8 @@ print_help (void)
 {
 {
 	print_revision (progname, revision);
 	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 (_("\
 	printf (_("\
 This plugin tests the STATUS of an HP printer with a JetDirect card.\n\
 This plugin tests the STATUS of an HP printer with a JetDirect card.\n\

+ 3 - 3
plugins/check_http.c

@@ -261,7 +261,7 @@ process_arguments (int argc, char **argv)
 			break;
 			break;
 		case 't': /* timeout period */
 		case 't': /* timeout period */
 			if (!is_intnonneg (optarg))
 			if (!is_intnonneg (optarg))
-				usage2 (_("timeout interval must be a non-negative integer"), optarg);
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			else
 			else
 				socket_timeout = atoi (optarg);
 				socket_timeout = atoi (optarg);
 			break;
 			break;
@@ -1363,8 +1363,8 @@ print_help (void)
 {
 {
 	print_revision (progname, revision);
 	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 (_("\
 	printf (_("\
 This plugin tests the HTTP service on the specified host. It can test\n\
 This plugin tests the HTTP service on the specified host. It can test\n\

+ 3 - 3
plugins/check_ldap.c

@@ -195,7 +195,7 @@ process_arguments (int argc, char **argv)
 			exit (STATE_OK);
 			exit (STATE_OK);
 		case 't':									/* timeout period */
 		case 't':									/* timeout period */
 			if (!is_intnonneg (optarg))
 			if (!is_intnonneg (optarg))
-				usage2 (_("timeout interval must be a positive integer"), optarg);
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			else
 			else
 				socket_timeout = atoi (optarg);
 				socket_timeout = atoi (optarg);
 			break;
 			break;
@@ -283,8 +283,8 @@ 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 ("Copyright (c) 1999 Didi Rieder (adrieder@sbox.tu-graz.ac.at)\n");
+	printf (COPYRIGHT, copyright, email);
 
 
 	print_usage ();
 	print_usage ();
 
 

+ 2 - 2
plugins/check_load.c

@@ -303,8 +303,8 @@ print_help (void)
 {
 {
 	print_revision (progname, revision);
 	print_revision (progname, revision);
 
 
-	printf (_("Copyright (c) 1999 Felipe Gustavo de Almeida <galmeida@linux.ime.usp.br>\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Felipe Gustavo de Almeida <galmeida@linux.ime.usp.br>\n");
+	printf (COPYRIGHT, copyright, email);
 
 
 	printf (_("This plugin tests the current system load average.\n\n"));
 	printf (_("This plugin tests the current system load average.\n\n"));
 
 

+ 2 - 2
plugins/check_mrtg.c

@@ -308,8 +308,8 @@ print_help (void)
 {
 {
 	print_revision (progname, revision);
 	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(_("\
 	printf(_("\
 This plugin will check either the average or maximum value of one of the\n\
 This plugin will check either the average or maximum value of one of the\n\

+ 2 - 2
plugins/check_mrtgtraf.c

@@ -320,8 +320,8 @@ print_help (void)
 {
 {
 	print_revision (progname, revision);
 	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);
 
 
 	print_usage ();
 	print_usage ();
 
 

+ 2 - 2
plugins/check_mysql.c

@@ -183,7 +183,7 @@ process_arguments (int argc, char **argv)
 				db_host = optarg;
 				db_host = optarg;
 			}
 			}
 			else {
 			else {
-				usage (_("Invalid host name\n"));
+				usage2 (_("Invalid host name"), optarg);
 			}
 			}
 			break;
 			break;
 		case 'd':									/* hostname */
 		case 'd':									/* hostname */
@@ -221,7 +221,7 @@ process_arguments (int argc, char **argv)
 				db_host = argv[c++];
 				db_host = argv[c++];
 			}
 			}
 			else {
 			else {
-				usage ("Invalid host name");
+				usage2 (_("Invalid host name"), optarg);
 			}
 			}
 		else if (strlen(db_user) == 0)
 		else if (strlen(db_user) == 0)
 			db_user = argv[c++];
 			db_user = argv[c++];

+ 2 - 2
plugins/check_nwstat.c

@@ -906,8 +906,8 @@ void print_help(void)
 
 
 	print_revision (progname, revision);
 	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 (_("\
 	printf (_("\
 Usage: %s This plugin attempts to contact the MRTGEXT NLM running\n\
 Usage: %s This plugin attempts to contact the MRTGEXT NLM running\n\

+ 2 - 2
plugins/check_overcr.c

@@ -420,8 +420,8 @@ print_help (void)
 
 
 	print_revision (progname, revision);
 	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 (_("\
 	printf (_("\
 This plugin attempts to contact the Over-CR collector daemon running on the\n\
 This plugin attempts to contact the Over-CR collector daemon running on the\n\

+ 2 - 2
plugins/check_pgsql.c

@@ -216,7 +216,7 @@ process_arguments (int argc, char **argv)
 			exit (STATE_OK);
 			exit (STATE_OK);
 		case 't':     /* timeout period */
 		case 't':     /* timeout period */
 			if (!is_integer (optarg))
 			if (!is_integer (optarg))
-				usage2 (_("Timeout Interval must be an integer"), optarg);
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			else
 			else
 				timeout_interval = atoi (optarg);
 				timeout_interval = atoi (optarg);
 			break;
 			break;
@@ -234,7 +234,7 @@ process_arguments (int argc, char **argv)
 			break;
 			break;
 		case 'H':     /* host */
 		case 'H':     /* host */
 			if (!is_host (optarg))
 			if (!is_host (optarg))
-				usage2 (_("You gave an invalid host name"), optarg);
+				usage2 (_("Invalid host name"), optarg);
 			else
 			else
 				pghost = optarg;
 				pghost = optarg;
 			break;
 			break;

+ 3 - 4
plugins/check_ping.c

@@ -270,8 +270,7 @@ process_arguments (int argc, char **argv)
 
 
 	if (addresses[0] == NULL) {
 	if (addresses[0] == NULL) {
 		if (is_host (argv[c]) == FALSE) {
 		if (is_host (argv[c]) == FALSE) {
-			printf (_("Invalid host name/address: %s\n\n"), argv[c]);
-			return ERROR;
+			usage2 (_("Invalid host name/address"), argv[c]);
 		} else {
 		} else {
 			addresses[0] = argv[c++];
 			addresses[0] = argv[c++];
 			n_addresses++;
 			n_addresses++;
@@ -506,8 +505,8 @@ print_help (void)
 {
 {
 	print_revision (progname, revision);
 	print_revision (progname, revision);
 
 
-	printf (_("Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>");
+	printf (COPYRIGHT, copyright, email);
 
 
 	printf (_("Use ping to check connection statistics for a remote host.\n\n"));
 	printf (_("Use ping to check connection statistics for a remote host.\n\n"));
 
 

+ 3 - 3
plugins/check_procs.c

@@ -348,7 +348,7 @@ process_arguments (int argc, char **argv)
 			exit (STATE_OK);
 			exit (STATE_OK);
 		case 't':									/* timeout period */
 		case 't':									/* timeout period */
 			if (!is_integer (optarg))
 			if (!is_integer (optarg))
-				usage (_("Timeout Interval must be an integer!\n\n"));
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			else
 			else
 				timeout_interval = atoi (optarg);
 				timeout_interval = atoi (optarg);
 			break;
 			break;
@@ -588,8 +588,8 @@ print_help (void)
 {
 {
 	print_revision (progname, revision);
 	print_revision (progname, revision);
 
 
-	printf (_("Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>");
+	printf (COPYRIGHT, copyright, email);
 
 
 	printf(_("\
 	printf(_("\
 Checks all processes and generates WARNING or CRITICAL states if the specified\n\
 Checks all processes and generates WARNING or CRITICAL states if the specified\n\

+ 5 - 7
plugins/check_radius.c

@@ -190,7 +190,7 @@ process_arguments (int argc, char **argv)
 		if (is_intpos (argv[4]))
 		if (is_intpos (argv[4]))
 			timeout_interval = atoi (argv[4]);
 			timeout_interval = atoi (argv[4]);
 		else
 		else
-			usage (_("Timeout interval must be a positive integer"));
+			usage2 (_("Timeout interval must be a positive integer"), optarg);
 		if (is_intpos (argv[5]))
 		if (is_intpos (argv[5]))
 			retries = atoi (argv[5]);
 			retries = atoi (argv[5]);
 		else
 		else
@@ -227,9 +227,7 @@ process_arguments (int argc, char **argv)
 			break;
 			break;
 		case 'H':									/* hostname */
 		case 'H':									/* hostname */
 			if (is_host (optarg) == FALSE) {
 			if (is_host (optarg) == FALSE) {
-				printf (_("Invalid host name/address\n\n"));
-				print_usage ();
-				exit (STATE_UNKNOWN);
+				usage2 (_("Invalid host name/address"), optarg);
 			}
 			}
 			server = optarg;
 			server = optarg;
 			break;
 			break;
@@ -264,7 +262,7 @@ process_arguments (int argc, char **argv)
 			if (is_intpos (optarg))
 			if (is_intpos (optarg))
 				timeout_interval = atoi (optarg);
 				timeout_interval = atoi (optarg);
 			else
 			else
-				usage (_("Timeout interval must be a positive integer"));
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			break;
 			break;
 		}
 		}
 	}
 	}
@@ -284,8 +282,8 @@ print_help (void)
 
 
 	print_revision (progname, revision);
 	print_revision (progname, revision);
 
 
-	printf (_("Copyright (c) 1999 Robert August Vincent II\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Robert August Vincent II\n");
+	printf (COPYRIGHT, copyright, email);
 
 
 	printf(_("Tests to see if a radius server is accepting connections.\n\n"));
 	printf(_("Tests to see if a radius server is accepting connections.\n\n"));
 
 

+ 4 - 4
plugins/check_real.c

@@ -303,7 +303,7 @@ process_arguments (int argc, char **argv)
 			else if (is_host (optarg))
 			else if (is_host (optarg))
 				server_address = optarg;
 				server_address = optarg;
 			else
 			else
-				usage (_("Invalid host name\n"));
+				usage2 (_("Invalid host name"), optarg);
 			break;
 			break;
 		case 'e':									/* string to expect in response header */
 		case 'e':									/* string to expect in response header */
 			server_expect = optarg;
 			server_expect = optarg;
@@ -365,7 +365,7 @@ process_arguments (int argc, char **argv)
 			server_address = argv[c++];
 			server_address = argv[c++];
 		}
 		}
 		else {
 		else {
-			usage (_("Invalid host name"));
+			usage2 (_("Invalid host name"), argv[c]);
 		}
 		}
 	}
 	}
 
 
@@ -403,8 +403,8 @@ print_help (void)
 
 
 	print_revision (progname, "$Revision$");
 	print_revision (progname, "$Revision$");
 
 
-	printf (_("Copyright (c) 1999 Pedro Leite <leite@cic.ua.pt>\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Pedro Leite <leite@cic.ua.pt>\n");
+	printf (COPYRIGHT, copyright, email);
 
 
 	printf (_("This plugin tests the REAL service on the specified host.\n\n"));
 	printf (_("This plugin tests the REAL service on the specified host.\n\n"));
 
 

+ 4 - 4
plugins/check_smtp.c

@@ -292,7 +292,7 @@ process_arguments (int argc, char **argv)
 				server_address = optarg;
 				server_address = optarg;
 			}
 			}
 			else {
 			else {
-				usage (_("Invalid host name\n"));
+				usage2 (_("Invalid host name"), optarg);
 			}
 			}
 			break;
 			break;
 		case 'p':									/* port */
 		case 'p':									/* port */
@@ -384,7 +384,7 @@ process_arguments (int argc, char **argv)
 			if (is_host (argv[c]))
 			if (is_host (argv[c]))
 				server_address = argv[c];
 				server_address = argv[c];
 			else
 			else
-				usage (_("Invalid host name"));
+				usage2 (_("Invalid host name"), argv[c]);
 		}
 		}
 		else {
 		else {
 			asprintf (&server_address, "127.0.0.1");
 			asprintf (&server_address, "127.0.0.1");
@@ -426,8 +426,8 @@ print_help (void)
 
 
 	print_revision (progname, revision);
 	print_revision (progname, revision);
 
 
-	printf (_("Copyright (c) 1999-2001 Ethan Galstad <nagios@nagios.org>\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999-2001 Ethan Galstad <nagios@nagios.org>\n");
+	printf (COPYRIGHT, copyright, email);
 
 
 	printf(_("\
 	printf(_("\
 This plugin will attempt to open an SMTP connection with the host.\n\n"));
 This plugin will attempt to open an SMTP connection with the host.\n\n"));

+ 1 - 1
plugins/check_snmp.c

@@ -446,7 +446,7 @@ process_arguments (int argc, char **argv)
 			break;
 			break;
 		case 't':	/* timeout period */
 		case 't':	/* timeout period */
 			if (!is_integer (optarg))
 			if (!is_integer (optarg))
-				usage2 (_("Timeout Interval must be an integer"), optarg);
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			else
 			else
 				timeout_interval = atoi (optarg);
 				timeout_interval = atoi (optarg);
 			break;
 			break;

+ 4 - 4
plugins/check_ssh.c

@@ -114,7 +114,7 @@ process_arguments (int argc, char **argv)
 			break;
 			break;
 		case 't':									/* timeout period */
 		case 't':									/* timeout period */
 			if (!is_integer (optarg))
 			if (!is_integer (optarg))
-				usage (_("Timeout Interval must be an integer!\n\n"));
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			else
 			else
 				socket_timeout = atoi (optarg);
 				socket_timeout = atoi (optarg);
 			break;
 			break;
@@ -130,7 +130,7 @@ process_arguments (int argc, char **argv)
 			break;
 			break;
 		case 'H':									/* host */
 		case 'H':									/* host */
 			if (is_host (optarg) == FALSE)
 			if (is_host (optarg) == FALSE)
-				usage ("Invalid hostname/address\n");
+				usage2 (_("Invalid host name/address"), optarg);
 			server_name = optarg;
 			server_name = optarg;
 			break;
 			break;
 		case 'p':									/* port */
 		case 'p':									/* port */
@@ -233,8 +233,8 @@ print_help (void)
 
 
 	print_revision (progname, revision);
 	print_revision (progname, revision);
 
 
-	printf (_("Copyright (c) 1999 Remi Paulmier <remi@sinfomic.fr>\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Remi Paulmier <remi@sinfomic.fr>\n");
+	printf (COPYRIGHT, copyright, email);
 
 
 	printf (_("Try to connect to SSH server at specified server and port\n\n"));
 	printf (_("Try to connect to SSH server at specified server and port\n\n"));
 
 

+ 4 - 4
plugins/check_tcp.c

@@ -429,7 +429,7 @@ process_arguments (int argc, char **argv)
 			break;
 			break;
 		case 'H':                 /* hostname */
 		case 'H':                 /* hostname */
 			if (is_host (optarg) == FALSE)
 			if (is_host (optarg) == FALSE)
-				usage2 (_("invalid host name or address"), optarg);
+				usage2 (_("Invalid host name/address"), optarg);
 			server_address = optarg;
 			server_address = optarg;
 			break;
 			break;
 		case 'c':                 /* critical */
 		case 'c':                 /* critical */
@@ -459,7 +459,7 @@ process_arguments (int argc, char **argv)
 			break;
 			break;
 		case 't':                 /* timeout */
 		case 't':                 /* timeout */
 			if (!is_intpos (optarg))
 			if (!is_intpos (optarg))
-				usage (_("Timeout interval must be a positive integer\n"));
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			else
 			else
 				socket_timeout = atoi (optarg);
 				socket_timeout = atoi (optarg);
 			break;
 			break;
@@ -603,8 +603,8 @@ print_help (void)
 {
 {
 	print_revision (progname, revision);
 	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"),
 	printf (_("This plugin tests %s connections with the specified host.\n\n"),
 	        SERVICE);
 	        SERVICE);

+ 5 - 5
plugins/check_time.c

@@ -226,7 +226,7 @@ process_arguments (int argc, char **argv)
 			exit (STATE_OK);
 			exit (STATE_OK);
 		case 'H':									/* hostname */
 		case 'H':									/* hostname */
 			if (is_host (optarg) == FALSE)
 			if (is_host (optarg) == FALSE)
-				usage (_("Invalid host name/address\n"));
+				usage2 (_("Invalid host name/address"), optarg);
 			server_address = optarg;
 			server_address = optarg;
 			break;
 			break;
 		case 'w':									/* warning-variance */
 		case 'w':									/* warning-variance */
@@ -288,7 +288,7 @@ process_arguments (int argc, char **argv)
 			break;
 			break;
 		case 't':									/* timeout */
 		case 't':									/* timeout */
 			if (!is_intnonneg (optarg))
 			if (!is_intnonneg (optarg))
-				usage (_("Timeout interval must be a nonnegative integer\n"));
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			else
 			else
 				socket_timeout = atoi (optarg);
 				socket_timeout = atoi (optarg);
 			break;
 			break;
@@ -301,7 +301,7 @@ process_arguments (int argc, char **argv)
 	if (server_address == NULL) {
 	if (server_address == NULL) {
 		if (argc > c) {
 		if (argc > c) {
 			if (is_host (argv[c]) == FALSE)
 			if (is_host (argv[c]) == FALSE)
-				usage (_("Invalid host name/address\n"));
+				usage2 (_("Invalid host name/address"), optarg);
 			server_address = argv[c];
 			server_address = argv[c];
 		}
 		}
 		else {
 		else {
@@ -325,8 +325,8 @@ print_help (void)
 
 
 	print_revision (progname, revision);
 	print_revision (progname, revision);
 
 
-	printf (_("Copyright (c) 1999 Ethan Galstad\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Ethan Galstad\n");
+	printf (COPYRIGHT, copyright, email);
 
 
 	printf (_("\
 	printf (_("\
 This plugin will check the time on the specified host.\n\n"));
 This plugin will check the time on the specified host.\n\n"));

+ 5 - 5
plugins/check_udp.c

@@ -158,7 +158,7 @@ process_arguments (int argc, char **argv)
 			break;
 			break;
 		case 'H':									/* hostname */
 		case 'H':									/* hostname */
 			if (is_host (optarg) == FALSE)
 			if (is_host (optarg) == FALSE)
-				usage (_("Invalid host name/address\n"));
+				usage2 (_("Invalid host name/address"), optarg);
 			server_address = optarg;
 			server_address = optarg;
 			break;
 			break;
 		case 'c':									/* critical */
 		case 'c':									/* critical */
@@ -177,7 +177,7 @@ process_arguments (int argc, char **argv)
 			break;
 			break;
 		case 't':									/* timeout */
 		case 't':									/* timeout */
 			if (!is_intnonneg (optarg))
 			if (!is_intnonneg (optarg))
-				usage (_("Timeout interval must be a nonnegative integer\n"));
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			else
 			else
 				socket_timeout = atoi (optarg);
 				socket_timeout = atoi (optarg);
 			break;
 			break;
@@ -199,7 +199,7 @@ process_arguments (int argc, char **argv)
 	c = optind;
 	c = optind;
 	if (server_address == NULL && c < argc && argv[c]) {
 	if (server_address == NULL && c < argc && argv[c]) {
 		if (is_host (argv[c]) == FALSE)
 		if (is_host (argv[c]) == FALSE)
-			usage (_("Invalid host name/address\n"));
+			usage2 (_("Invalid host name/address"), optarg);
 		server_address = argv[c++];
 		server_address = argv[c++];
 	}
 	}
 
 
@@ -222,8 +222,8 @@ print_help (void)
 {
 {
 	print_revision (progname, revision);
 	print_revision (progname, revision);
 
 
-	printf (_("Copyright (c) 1999 Ethan Galstad\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Ethan Galstad\n");
+	printf (COPYRIGHT, copyright, email);
 
 
 	printf (_("\
 	printf (_("\
 This plugin tests an UDP connection with the specified host.\n\n"));
 This plugin tests an UDP connection with the specified host.\n\n"));

+ 4 - 4
plugins/check_ups.c

@@ -472,7 +472,7 @@ process_arguments (int argc, char **argv)
 				server_address = optarg;
 				server_address = optarg;
 			}
 			}
 			else {
 			else {
-				usage2 ("Invalid host name", optarg);
+				usage2 (_("Invalid host name"), optarg);
 			}
 			}
 			break;
 			break;
 		case 'u':									/* ups name */
 		case 'u':									/* ups name */
@@ -538,7 +538,7 @@ process_arguments (int argc, char **argv)
 		if (is_host (argv[optind]))
 		if (is_host (argv[optind]))
 			server_address = argv[optind++];
 			server_address = argv[optind++];
 		else
 		else
-			usage ("Invalid host name");
+			usage2 (_("Invalid host name"), optarg);
 	}
 	}
 
 
 	if (server_address == NULL)
 	if (server_address == NULL)
@@ -570,8 +570,8 @@ print_help (void)
 
 
 	print_revision (progname, revision);
 	print_revision (progname, revision);
 
 
-	printf (_("Copyright (c) 2000 Tom Shields"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 2000 Tom Shields");
+	printf (COPYRIGHT, copyright, email);
 
 
 	printf (_("This plugin tests the UPS service on the specified host.\n\
 	printf (_("This plugin tests the UPS service on the specified host.\n\
 Network UPS Tools from www.exploits.org must be running for this plugin to\n\
 Network UPS Tools from www.exploits.org must be running for this plugin to\n\

+ 2 - 2
plugins/check_users.c

@@ -192,8 +192,8 @@ print_help (void)
 {
 {
 	print_revision (progname, revision);
 	print_revision (progname, revision);
 
 
-	printf (_("Copyright (c) 1999 Ethan Galstad\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Ethan Galstad\n");
+	printf (COPYRIGHT, copyright, email);
 
 
 	printf (_("\
 	printf (_("\
 This plugin checks the number of users currently logged in on the local\n\
 This plugin checks the number of users currently logged in on the local\n\

+ 1 - 1
plugins/negate.c

@@ -180,7 +180,7 @@ process_arguments (int argc, char **argv)
 			exit (EXIT_SUCCESS);
 			exit (EXIT_SUCCESS);
 		case 't':     /* timeout period */
 		case 't':     /* timeout period */
 			if (!is_integer (optarg))
 			if (!is_integer (optarg))
-				usage2 (_("Timeout Interval must be an integer"), optarg);
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			else
 			else
 				timeout_interval = atoi (optarg);
 				timeout_interval = atoi (optarg);
 			break;
 			break;

+ 2 - 2
plugins/urlize.c

@@ -129,8 +129,8 @@ print_help (void)
 {
 {
 	print_revision (progname, revision);
 	print_revision (progname, revision);
 
 
-	printf (_("Copyright (c) 2000 Karl DeBisschop <kdebisschop@users.sourceforge.net>\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 2000 Karl DeBisschop <kdebisschop@users.sourceforge.net>\n");
+	printf (COPYRIGHT, copyright, email);
 
 
 	printf (_("\n\
 	printf (_("\n\
 This plugin wraps the text output of another command (plugin) in HTML\n\
 This plugin wraps the text output of another command (plugin) in HTML\n\