[Nagiosplug-checkins] nagiosplug/plugins check_by_ssh.c,1.21,1.22 check_dig.c,1.26,1.27 check_disk.c,1.45,1.46 check_dns.c,1.28,1.29 check_dummy.c,1.7,1.8 check_fping.c,1.13,1.14 check_game.c,1.10,1.11 check_hpjd.c,1.19,1.20 check_http.c,1.64,1.65 check_ldap.c,1.16,1.17 check_load.c,1.15,1.16 check_mrtg.c,1.13,1.14 check_mrtgtraf.c,1.13,1.14 check_mysql.c,1.14,1.15 check_nwstat.c,1.14,1.15 check_overcr.c,1.8,1.9 check_pgsql.c,1.17,1.18 check_ping.c,1.28,1.29 check_procs.c,1.28,1.29 check_radius.c,1.10,1.11 check_real.c,1.13,1.14 check_smtp.c,1.28,1.29 check_snmp.c,1.38,1.39 check_ssh.c,1.13,1.14 check_tcp.c,1.42,1.43 check_time.c,1.13,1.14 check_udp.c,1.12,1.13 check_ups.c,1.14,1.15 check_users.c,1.10,1.11 negate.c,1.14,1.15 urlize.c,1.10,1.11

Ton Voon tonvoon at users.sourceforge.net
Tue Nov 23 16:47:13 CET 2004


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15473

Modified Files:
	check_by_ssh.c check_dig.c check_disk.c check_dns.c 
	check_dummy.c check_fping.c check_game.c check_hpjd.c 
	check_http.c check_ldap.c check_load.c check_mrtg.c 
	check_mrtgtraf.c check_mysql.c check_nwstat.c check_overcr.c 
	check_pgsql.c check_ping.c check_procs.c check_radius.c 
	check_real.c check_smtp.c check_snmp.c check_ssh.c check_tcp.c 
	check_time.c check_udp.c check_ups.c check_users.c negate.c 
	urlize.c 
Log Message:
Making messages more consistent


Index: check_mrtg.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_mrtg.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- check_mrtg.c	23 Nov 2004 23:53:15 -0000	1.13
+++ check_mrtg.c	24 Nov 2004 00:46:39 -0000	1.14
@@ -308,8 +308,8 @@
 {
 	print_revision (progname, revision);
 
-	printf (_("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>\n");
+	printf (COPYRIGHT, copyright, email);
 
 	printf(_("\
 This plugin will check either the average or maximum value of one of the\n\

Index: check_dummy.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dummy.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- check_dummy.c	28 Jan 2004 11:42:39 -0000	1.7
+++ check_dummy.c	24 Nov 2004 00:46:38 -0000	1.8
@@ -86,8 +86,8 @@
 {
 	print_revision (progname, revision);
 
-	printf (_("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>\n");
+	printf (COPYRIGHT, copyright, email);
 
 	print_usage ();
 

Index: check_tcp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_tcp.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- check_tcp.c	18 Nov 2004 22:42:17 -0000	1.42
+++ check_tcp.c	24 Nov 2004 00:46:39 -0000	1.43
@@ -429,7 +429,7 @@
 			break;
 		case 'H':                 /* hostname */
 			if (is_host (optarg) == FALSE)
-				usage2 (_("invalid host name or address"), optarg);
+				usage2 (_("Invalid host name/address"), optarg);
 			server_address = optarg;
 			break;
 		case 'c':                 /* critical */
@@ -459,7 +459,7 @@
 			break;
 		case 't':                 /* timeout */
 			if (!is_intpos (optarg))
-				usage (_("Timeout interval must be a positive integer\n"));
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			else
 				socket_timeout = atoi (optarg);
 			break;
@@ -603,8 +603,8 @@
 {
 	print_revision (progname, revision);
 
-	printf (_("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>\n");
+	printf (COPYRIGHT, copyright, email);
 
 	printf (_("This plugin tests %s connections with the specified host.\n\n"),
 	        SERVICE);

Index: check_overcr.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_overcr.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- check_overcr.c	22 Aug 2003 06:22:38 -0000	1.8
+++ check_overcr.c	24 Nov 2004 00:46:39 -0000	1.9
@@ -420,8 +420,8 @@
 
 	print_revision (progname, revision);
 
-	printf (_("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>\n");
+	printf (COPYRIGHT, copyright, email);
 
 	printf (_("\
 This plugin attempts to contact the Over-CR collector daemon running on the\n\

Index: check_radius.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_radius.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- check_radius.c	18 Mar 2004 20:31:52 -0000	1.10
+++ check_radius.c	24 Nov 2004 00:46:39 -0000	1.11
@@ -190,7 +190,7 @@
 		if (is_intpos (argv[4]))
 			timeout_interval = atoi (argv[4]);
 		else
-			usage (_("Timeout interval must be a positive integer"));
+			usage2 (_("Timeout interval must be a positive integer"), optarg);
 		if (is_intpos (argv[5]))
 			retries = atoi (argv[5]);
 		else
@@ -227,9 +227,7 @@
 			break;
 		case 'H':									/* hostname */
 			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;
 			break;
@@ -264,7 +262,7 @@
 			if (is_intpos (optarg))
 				timeout_interval = atoi (optarg);
 			else
-				usage (_("Timeout interval must be a positive integer"));
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			break;
 		}
 	}
@@ -284,8 +282,8 @@
 
 	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"));
 

Index: check_mrtgtraf.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_mrtgtraf.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- check_mrtgtraf.c	23 Nov 2004 23:53:15 -0000	1.13
+++ check_mrtgtraf.c	24 Nov 2004 00:46:39 -0000	1.14
@@ -320,8 +320,8 @@
 {
 	print_revision (progname, revision);
 
-	printf (_("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>\n");
+	printf (COPYRIGHT, copyright, email);
 
 	print_usage ();
 

Index: check_by_ssh.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_by_ssh.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- check_by_ssh.c	23 Nov 2004 23:53:17 -0000	1.21
+++ check_by_ssh.c	24 Nov 2004 00:46:38 -0000	1.22
@@ -297,7 +297,7 @@
 		if (c <= argc) {
 			die (STATE_UNKNOWN, _("%s: You must provide a host name\n"), progname);
 		} 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++];
 	}
 

Index: check_http.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_http.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- check_http.c	20 Nov 2004 21:36:52 -0000	1.64
+++ check_http.c	24 Nov 2004 00:46:38 -0000	1.65
@@ -261,7 +261,7 @@
 			break;
 		case 't': /* timeout period */
 			if (!is_intnonneg (optarg))
-				usage2 (_("timeout interval must be a non-negative integer"), optarg);
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			else
 				socket_timeout = atoi (optarg);
 			break;
@@ -1363,8 +1363,8 @@
 {
 	print_revision (progname, revision);
 
-	printf (_("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>\n");
+	printf (COPYRIGHT, copyright, email);
 
 	printf (_("\
 This plugin tests the HTTP service on the specified host. It can test\n\

Index: check_time.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_time.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- check_time.c	23 Nov 2004 23:53:17 -0000	1.13
+++ check_time.c	24 Nov 2004 00:46:39 -0000	1.14
@@ -226,7 +226,7 @@
 			exit (STATE_OK);
 		case 'H':									/* hostname */
 			if (is_host (optarg) == FALSE)
-				usage (_("Invalid host name/address\n"));
+				usage2 (_("Invalid host name/address"), optarg);
 			server_address = optarg;
 			break;
 		case 'w':									/* warning-variance */
@@ -288,7 +288,7 @@
 			break;
 		case 't':									/* timeout */
 			if (!is_intnonneg (optarg))
-				usage (_("Timeout interval must be a nonnegative integer\n"));
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			else
 				socket_timeout = atoi (optarg);
 			break;
@@ -301,7 +301,7 @@
 	if (server_address == NULL) {
 		if (argc > c) {
 			if (is_host (argv[c]) == FALSE)
-				usage (_("Invalid host name/address\n"));
+				usage2 (_("Invalid host name/address"), optarg);
 			server_address = argv[c];
 		}
 		else {
@@ -325,8 +325,8 @@
 
 	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 (_("\
 This plugin will check the time on the specified host.\n\n"));

Index: check_ssh.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ssh.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- check_ssh.c	22 Aug 2003 06:22:38 -0000	1.13
+++ check_ssh.c	24 Nov 2004 00:46:39 -0000	1.14
@@ -114,7 +114,7 @@
 			break;
 		case 't':									/* timeout period */
 			if (!is_integer (optarg))
-				usage (_("Timeout Interval must be an integer!\n\n"));
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			else
 				socket_timeout = atoi (optarg);
 			break;
@@ -130,7 +130,7 @@
 			break;
 		case 'H':									/* host */
 			if (is_host (optarg) == FALSE)
-				usage ("Invalid hostname/address\n");
+				usage2 (_("Invalid host name/address"), optarg);
 			server_name = optarg;
 			break;
 		case 'p':									/* port */
@@ -233,8 +233,8 @@
 
 	print_revision (progname, revision);
 
-	printf (_("Copyright (c) 1999 Remi Paulmier <remi at sinfomic.fr>\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Remi Paulmier <remi at sinfomic.fr>\n");
+	printf (COPYRIGHT, copyright, email);
 
 	printf (_("Try to connect to SSH server at specified server and port\n\n"));
 

Index: check_udp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_udp.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- check_udp.c	22 Aug 2003 06:22:38 -0000	1.12
+++ check_udp.c	24 Nov 2004 00:46:39 -0000	1.13
@@ -158,7 +158,7 @@
 			break;
 		case 'H':									/* hostname */
 			if (is_host (optarg) == FALSE)
-				usage (_("Invalid host name/address\n"));
+				usage2 (_("Invalid host name/address"), optarg);
 			server_address = optarg;
 			break;
 		case 'c':									/* critical */
@@ -177,7 +177,7 @@
 			break;
 		case 't':									/* timeout */
 			if (!is_intnonneg (optarg))
-				usage (_("Timeout interval must be a nonnegative integer\n"));
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			else
 				socket_timeout = atoi (optarg);
 			break;
@@ -199,7 +199,7 @@
 	c = optind;
 	if (server_address == NULL && c < argc && argv[c]) {
 		if (is_host (argv[c]) == FALSE)
-			usage (_("Invalid host name/address\n"));
+			usage2 (_("Invalid host name/address"), optarg);
 		server_address = argv[c++];
 	}
 
@@ -222,8 +222,8 @@
 {
 	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 (_("\
 This plugin tests an UDP connection with the specified host.\n\n"));

Index: check_fping.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_fping.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- check_fping.c	23 Mar 2004 06:35:44 -0000	1.13
+++ check_fping.c	24 Nov 2004 00:46:38 -0000	1.14
@@ -80,7 +80,7 @@
 	/* run the command */
 	child_process = spopen (command_line);
 	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;
 	}
 
@@ -254,9 +254,7 @@
 			break;
 		case 'H':									/* hostname */
 			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);
 			break;
@@ -362,8 +360,8 @@
 
 	print_revision (progname, "$Revision$");
 
-	printf (_("Copyright (c) 1999 Didi Rieder <adrieder at sbox.tu-graz.ac.at>\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Didi Rieder <adrieder at 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\

Index: check_users.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_users.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- check_users.c	11 Nov 2003 10:34:42 -0000	1.10
+++ check_users.c	24 Nov 2004 00:46:40 -0000	1.11
@@ -192,8 +192,8 @@
 {
 	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 (_("\
 This plugin checks the number of users currently logged in on the local\n\

Index: check_ping.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ping.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- check_ping.c	20 Nov 2004 22:28:57 -0000	1.28
+++ check_ping.c	24 Nov 2004 00:46:39 -0000	1.29
@@ -270,8 +270,7 @@
 
 	if (addresses[0] == NULL) {
 		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 {
 			addresses[0] = argv[c++];
 			n_addresses++;
@@ -506,8 +505,8 @@
 {
 	print_revision (progname, revision);
 
-	printf (_("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>");
+	printf (COPYRIGHT, copyright, email);
 
 	printf (_("Use ping to check connection statistics for a remote host.\n\n"));
 

Index: check_dns.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dns.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- check_dns.c	23 Nov 2004 23:53:17 -0000	1.28
+++ check_dns.c	24 Nov 2004 00:46:38 -0000	1.29
@@ -331,9 +331,7 @@
 		case 'r': /* reverse server name */
 			/* TODO: Is this is_host necessary? */
 			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)
 				die (STATE_UNKNOWN, _("Input buffer overflow\n"));
@@ -391,8 +389,8 @@
 {
 	print_revision (progname, revision);
 
-	printf (_("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>\n");
+	printf (COPYRIGHT, copyright, email);
 
 	print_usage ();
 

Index: check_hpjd.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_hpjd.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- check_hpjd.c	23 Nov 2004 23:53:13 -0000	1.19
+++ check_hpjd.c	24 Nov 2004 00:46:38 -0000	1.20
@@ -321,7 +321,7 @@
 				address = strscpy(address, optarg) ;
 			}
 			else {
-				usage (_("Invalid host name\n"));
+				usage2 (_("Invalid host name"), optarg);
 			}
 			break;
 		case 'C':									/* community */
@@ -344,7 +344,7 @@
 			address = argv[c++];
 		}
 		else {
-			usage (_("Invalid host name"));
+			usage2 (_("Invalid host name"), argv[c]);
 		}
 	}
 	
@@ -378,8 +378,8 @@
 {
 	print_revision (progname, revision);
 
-	printf (_("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>\n");
+	printf (COPYRIGHT, copyright, email);
 
 	printf (_("\
 This plugin tests the STATUS of an HP printer with a JetDirect card.\n\

Index: check_snmp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_snmp.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- check_snmp.c	28 Feb 2004 07:27:17 -0000	1.38
+++ check_snmp.c	24 Nov 2004 00:46:39 -0000	1.39
@@ -446,7 +446,7 @@
 			break;
 		case 't':	/* timeout period */
 			if (!is_integer (optarg))
-				usage2 (_("Timeout Interval must be an integer"), optarg);
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			else
 				timeout_interval = atoi (optarg);
 			break;

Index: check_real.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_real.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- check_real.c	23 Nov 2004 23:53:16 -0000	1.13
+++ check_real.c	24 Nov 2004 00:46:39 -0000	1.14
@@ -303,7 +303,7 @@
 			else if (is_host (optarg))
 				server_address = optarg;
 			else
-				usage (_("Invalid host name\n"));
+				usage2 (_("Invalid host name"), optarg);
 			break;
 		case 'e':									/* string to expect in response header */
 			server_expect = optarg;
@@ -365,7 +365,7 @@
 			server_address = argv[c++];
 		}
 		else {
-			usage (_("Invalid host name"));
+			usage2 (_("Invalid host name"), argv[c]);
 		}
 	}
 
@@ -403,8 +403,8 @@
 
 	print_revision (progname, "$Revision$");
 
-	printf (_("Copyright (c) 1999 Pedro Leite <leite at cic.ua.pt>\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Pedro Leite <leite at cic.ua.pt>\n");
+	printf (COPYRIGHT, copyright, email);
 
 	printf (_("This plugin tests the REAL service on the specified host.\n\n"));
 

Index: check_mysql.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_mysql.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- check_mysql.c	23 Nov 2004 23:53:16 -0000	1.14
+++ check_mysql.c	24 Nov 2004 00:46:39 -0000	1.15
@@ -183,7 +183,7 @@
 				db_host = optarg;
 			}
 			else {
-				usage (_("Invalid host name\n"));
+				usage2 (_("Invalid host name"), optarg);
 			}
 			break;
 		case 'd':									/* hostname */
@@ -221,7 +221,7 @@
 				db_host = argv[c++];
 			}
 			else {
-				usage ("Invalid host name");
+				usage2 (_("Invalid host name"), optarg);
 			}
 		else if (strlen(db_user) == 0)
 			db_user = argv[c++];

Index: check_dig.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dig.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- check_dig.c	18 Aug 2004 21:25:50 -0000	1.26
+++ check_dig.c	24 Nov 2004 00:46:38 -0000	1.27
@@ -321,8 +321,8 @@
 
 	print_revision (progname, revision);
 
-	printf (_("Copyright (c) 2000 Karl DeBisschop <kdebisschop at users.sourceforge.net>\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 2000 Karl DeBisschop <kdebisschop at users.sourceforge.net>\n");
+	printf (COPYRIGHT, copyright, email);
 
 	printf (_("Test the DNS service on the specified host using dig\n\n"));
 

Index: check_ups.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ups.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- check_ups.c	14 Mar 2004 04:09:19 -0000	1.14
+++ check_ups.c	24 Nov 2004 00:46:39 -0000	1.15
@@ -472,7 +472,7 @@
 				server_address = optarg;
 			}
 			else {
-				usage2 ("Invalid host name", optarg);
+				usage2 (_("Invalid host name"), optarg);
 			}
 			break;
 		case 'u':									/* ups name */
@@ -538,7 +538,7 @@
 		if (is_host (argv[optind]))
 			server_address = argv[optind++];
 		else
-			usage ("Invalid host name");
+			usage2 (_("Invalid host name"), optarg);
 	}
 
 	if (server_address == NULL)
@@ -570,8 +570,8 @@
 
 	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\
 Network UPS Tools from www.exploits.org must be running for this plugin to\n\

Index: check_disk.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_disk.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- check_disk.c	23 Nov 2004 05:49:11 -0000	1.45
+++ check_disk.c	24 Nov 2004 00:46:38 -0000	1.46
@@ -304,7 +304,7 @@
 				break;
 			}
 			else {
-				usage (_("Timeout Interval must be an integer!\n"));
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			}
 		case 'w':									/* warning threshold */
 			if (is_intnonneg (optarg)) {
@@ -572,8 +572,8 @@
 {
 	print_revision (progname, revision);
 
-	printf (_("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>\n");
+	printf (COPYRIGHT, copyright, email);
 
 	printf (_("\
 This plugin checks the amount of used disk space on a mounted file system\n\

Index: check_nwstat.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_nwstat.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- check_nwstat.c	29 Feb 2004 04:09:34 -0000	1.14
+++ check_nwstat.c	24 Nov 2004 00:46:39 -0000	1.15
@@ -906,8 +906,8 @@
 
 	print_revision (progname, revision);
 
-	printf (_("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>\n");
+	printf (COPYRIGHT, copyright, email);
 
 	printf (_("\
 Usage: %s This plugin attempts to contact the MRTGEXT NLM running\n\

Index: check_pgsql.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_pgsql.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- check_pgsql.c	14 Mar 2004 04:09:19 -0000	1.17
+++ check_pgsql.c	24 Nov 2004 00:46:39 -0000	1.18
@@ -216,7 +216,7 @@
 			exit (STATE_OK);
 		case 't':     /* timeout period */
 			if (!is_integer (optarg))
-				usage2 (_("Timeout Interval must be an integer"), optarg);
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			else
 				timeout_interval = atoi (optarg);
 			break;
@@ -234,7 +234,7 @@
 			break;
 		case 'H':     /* host */
 			if (!is_host (optarg))
-				usage2 (_("You gave an invalid host name"), optarg);
+				usage2 (_("Invalid host name"), optarg);
 			else
 				pghost = optarg;
 			break;

Index: check_smtp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_smtp.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- check_smtp.c	23 Nov 2004 23:53:16 -0000	1.28
+++ check_smtp.c	24 Nov 2004 00:46:39 -0000	1.29
@@ -292,7 +292,7 @@
 				server_address = optarg;
 			}
 			else {
-				usage (_("Invalid host name\n"));
+				usage2 (_("Invalid host name"), optarg);
 			}
 			break;
 		case 'p':									/* port */
@@ -384,7 +384,7 @@
 			if (is_host (argv[c]))
 				server_address = argv[c];
 			else
-				usage (_("Invalid host name"));
+				usage2 (_("Invalid host name"), argv[c]);
 		}
 		else {
 			asprintf (&server_address, "127.0.0.1");
@@ -426,8 +426,8 @@
 
 	print_revision (progname, revision);
 
-	printf (_("Copyright (c) 1999-2001 Ethan Galstad <nagios at nagios.org>\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999-2001 Ethan Galstad <nagios at nagios.org>\n");
+	printf (COPYRIGHT, copyright, email);
 
 	printf(_("\
 This plugin will attempt to open an SMTP connection with the host.\n\n"));

Index: check_game.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_game.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- check_game.c	4 Mar 2004 05:08:43 -0000	1.10
+++ check_game.c	24 Nov 2004 00:46:38 -0000	1.11
@@ -70,7 +70,7 @@
 		printf (_("Incorrect arguments supplied\n"));
 		printf ("\n");
 		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 ("\n");
 		return STATE_UNKNOWN;
@@ -91,7 +91,7 @@
 	/* run the command */
 	fp = spopen (command_line);
 	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;
 	}
 

Index: negate.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/negate.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- negate.c	20 Feb 2004 05:22:05 -0000	1.14
+++ negate.c	24 Nov 2004 00:46:40 -0000	1.15
@@ -180,7 +180,7 @@
 			exit (EXIT_SUCCESS);
 		case 't':     /* timeout period */
 			if (!is_integer (optarg))
-				usage2 (_("Timeout Interval must be an integer"), optarg);
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			else
 				timeout_interval = atoi (optarg);
 			break;

Index: check_procs.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_procs.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- check_procs.c	19 Nov 2004 03:44:13 -0000	1.28
+++ check_procs.c	24 Nov 2004 00:46:39 -0000	1.29
@@ -348,7 +348,7 @@
 			exit (STATE_OK);
 		case 't':									/* timeout period */
 			if (!is_integer (optarg))
-				usage (_("Timeout Interval must be an integer!\n\n"));
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			else
 				timeout_interval = atoi (optarg);
 			break;
@@ -588,8 +588,8 @@
 {
 	print_revision (progname, revision);
 
-	printf (_("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Ethan Galstad <nagios at nagios.org>");
+	printf (COPYRIGHT, copyright, email);
 
 	printf(_("\
 Checks all processes and generates WARNING or CRITICAL states if the specified\n\

Index: check_ldap.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ldap.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- check_ldap.c	14 Mar 2004 04:09:19 -0000	1.16
+++ check_ldap.c	24 Nov 2004 00:46:39 -0000	1.17
@@ -195,7 +195,7 @@
 			exit (STATE_OK);
 		case 't':									/* timeout period */
 			if (!is_intnonneg (optarg))
-				usage2 (_("timeout interval must be a positive integer"), optarg);
+				usage2 (_("Timeout interval must be a positive integer"), optarg);
 			else
 				socket_timeout = atoi (optarg);
 			break;
@@ -283,8 +283,8 @@
 
 	print_revision (progname, revision);
 
-	printf (_("Copyright (c) 1999 Didi Rieder (adrieder at sbox.tu-graz.ac.at)\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Didi Rieder (adrieder at sbox.tu-graz.ac.at)\n");
+	printf (COPYRIGHT, copyright, email);
 
 	print_usage ();
 

Index: check_load.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_load.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- check_load.c	14 Mar 2004 04:09:19 -0000	1.15
+++ check_load.c	24 Nov 2004 00:46:39 -0000	1.16
@@ -303,8 +303,8 @@
 {
 	print_revision (progname, revision);
 
-	printf (_("Copyright (c) 1999 Felipe Gustavo de Almeida <galmeida at linux.ime.usp.br>\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 1999 Felipe Gustavo de Almeida <galmeida at linux.ime.usp.br>\n");
+	printf (COPYRIGHT, copyright, email);
 
 	printf (_("This plugin tests the current system load average.\n\n"));
 

Index: urlize.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/urlize.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- urlize.c	20 Feb 2004 05:22:05 -0000	1.10
+++ urlize.c	24 Nov 2004 00:46:40 -0000	1.11
@@ -129,8 +129,8 @@
 {
 	print_revision (progname, revision);
 
-	printf (_("Copyright (c) 2000 Karl DeBisschop <kdebisschop at users.sourceforge.net>\n"));
-	printf (_(COPYRIGHT), copyright, email);
+	printf ("Copyright (c) 2000 Karl DeBisschop <kdebisschop at users.sourceforge.net>\n");
+	printf (COPYRIGHT, copyright, email);
 
 	printf (_("\n\
 This plugin wraps the text output of another command (plugin) in HTML\n\





More information about the Commits mailing list