[Nagiosplug-checkins] nagiosplug/plugins check_by_ssh.c,1.25,1.26 check_dig.c,1.30,1.31 check_disk.c,1.50,1.51 check_dns.c,1.33,1.34 check_fping.c,1.17,1.18 check_game.c,1.14,1.15 check_hpjd.c,1.23,1.24 check_http.c,1.69,1.70 check_ldap.c,1.19,1.20 check_load.c,1.19,1.20 check_mrtg.c,1.16,1.17 check_mrtgtraf.c,1.17,1.18 check_mysql.c,1.18,1.19 check_nagios.c,1.15,1.16 check_nt.c,1.28,1.29 check_nwstat.c,1.19,1.20 check_overcr.c,1.12,1.13 check_pgsql.c,1.21,1.22 check_ping.c,1.32,1.33 check_procs.c,1.32,1.33 check_radius.c,1.14,1.15 check_real.c,1.17,1.18 check_smtp.c,1.31,1.32 check_snmp.c,1.42,1.43 check_ssh.c,1.19,1.20 check_swap.c,1.34,1.35 check_tcp.c,1.47,1.48 check_time.c,1.17,1.18 check_udp.c,1.16,1.17 check_ups.c,1.19,1.20 check_users.c,1.13,1.14 negate.c,1.18,1.19 popen.c,1.9,1.10 utils.c,1.38,1.39

Benoit Mortier opensides at users.sourceforge.net
Thu Dec 2 08:52:05 CET 2004


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

Modified Files:
	check_by_ssh.c check_dig.c check_disk.c check_dns.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_nagios.c check_nt.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_swap.c check_tcp.c check_time.c check_udp.c 
	check_ups.c check_users.c negate.c popen.c utils.c 
Log Message:

More internationalization work
new usage4 function to permit localisation of think like check_ssh: xxxxx



Index: check_mrtg.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_mrtg.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- check_mrtg.c	2 Dec 2004 14:54:35 -0000	1.16
+++ check_mrtg.c	2 Dec 2004 16:51:24 -0000	1.17
@@ -60,7 +60,7 @@
 	textdomain (PACKAGE);
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_mrtg: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments\n"));
 
 	/* open the MRTG log file for reading */
 	fp = fopen (log_file, "r");

Index: check_tcp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_tcp.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- check_tcp.c	2 Dec 2004 14:54:35 -0000	1.47
+++ check_tcp.c	2 Dec 2004 16:51:25 -0000	1.48
@@ -240,7 +240,7 @@
 	status = strdup ("");
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_tcp: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	/* use default expect if none listed in process_arguments() */
 	if (EXPECT && server_expect_count == 0) {
@@ -265,7 +265,7 @@
 	    X509_free(server_cert);
 	  }
 	  else {
-	    printf("CRITICAL Cannot retrieve server certificate.\n");
+	    printf("CRITICAL - Cannot retrieve server certificate.\n");
 	    result = STATE_CRITICAL;
 	  }
 	  SSL_shutdown (ssl);

Index: check_overcr.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_overcr.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- check_overcr.c	2 Dec 2004 14:54:35 -0000	1.12
+++ check_overcr.c	2 Dec 2004 16:51:25 -0000	1.13
@@ -86,7 +86,7 @@
 	textdomain (PACKAGE);
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_overcr: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	/* initialize alarm signal handling */
 	signal (SIGALRM, socket_timeout_alarm_handler);

Index: check_radius.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_radius.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- check_radius.c	2 Dec 2004 14:54:35 -0000	1.14
+++ check_radius.c	2 Dec 2004 16:51:25 -0000	1.15
@@ -113,7 +113,7 @@
 	textdomain (PACKAGE);
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_radius: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	str = strdup ("dictionary");
 	if ((config_file && rc_read_config (config_file)) ||

Index: check_mrtgtraf.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_mrtgtraf.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- check_mrtgtraf.c	2 Dec 2004 14:54:35 -0000	1.17
+++ check_mrtgtraf.c	2 Dec 2004 16:51:24 -0000	1.18
@@ -63,12 +63,12 @@
 	char outgoing_speed_rating[8];
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_ldap: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	/* open the MRTG log file for reading */
 	fp = fopen (log_file, "r");
 	if (fp == NULL)
-		usage (_("Unable to open MRTG log file\n"));
+		usage4 (_("Unable to open MRTG log file"));
 
 	line = 0;
 	while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, fp)) {
@@ -110,7 +110,7 @@
 
 	/* if we couldn't read enough data, return an unknown error */
 	if (line <= 2)
-		usage (_("Unable to process MRTG log file\n"));
+		usage4 (_("Unable to process MRTG log file"));
 
 	/* make sure the MRTG data isn't too old */
 	time (&current_time);

Index: check_by_ssh.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_by_ssh.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- check_by_ssh.c	2 Dec 2004 14:54:35 -0000	1.25
+++ check_by_ssh.c	2 Dec 2004 16:51:24 -0000	1.26
@@ -69,17 +69,14 @@
 
 	/* process arguments */
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_by_ssh: could not parse arguments\n"));
-
+		usage4 (_("Could not parse arguments"));
 
 	/* Set signal handling and alarm timeout */
 	if (signal (SIGALRM, popen_timeout_alarm_handler) == SIG_ERR) {
-		printf (_("Cannot catch SIGALRM"));
-		return STATE_UNKNOWN;
+		usage4 (_("	Cannot catch SIGALRM"));
 	}
 	alarm (timeout_interval);
 
-
 	/* run the command */
 
 	if (verbose)

Index: check_http.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_http.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- check_http.c	2 Dec 2004 14:35:04 -0000	1.69
+++ check_http.c	2 Dec 2004 16:51:24 -0000	1.70
@@ -146,7 +146,7 @@
 	          clean_revstring (revision), VERSION);
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_http: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	if (strstr (timestamp, ":")) {
 		if (strstr (server_url, "?"))

Index: utils.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/utils.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- utils.c	1 Dec 2004 23:54:51 -0000	1.38
+++ utils.c	2 Dec 2004 16:51:25 -0000	1.39
@@ -73,6 +73,13 @@
 	exit (STATE_UNKNOWN);
 }
 
+void
+usage4 (const char *msg)
+{
+	printf ("%s: %s\n", progname, msg);
+	print_usage();
+	exit (STATE_UNKNOWN);
+}
 
 void
 support (void)

Index: check_time.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_time.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- check_time.c	2 Dec 2004 14:54:36 -0000	1.17
+++ check_time.c	2 Dec 2004 16:51:25 -0000	1.18
@@ -63,7 +63,7 @@
 	textdomain (PACKAGE);
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_time: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	/* initialize alarm signal handling */
 	signal (SIGALRM, socket_timeout_alarm_handler);

Index: check_ssh.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ssh.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- check_ssh.c	2 Dec 2004 14:54:35 -0000	1.19
+++ check_ssh.c	2 Dec 2004 16:51:25 -0000	1.20
@@ -58,7 +58,7 @@
 	textdomain (PACKAGE);
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_ssh: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	/* initialize alarm signal handling */
 	signal (SIGALRM, socket_timeout_alarm_handler);

Index: check_udp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_udp.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- check_udp.c	2 Dec 2004 14:54:36 -0000	1.16
+++ check_udp.c	2 Dec 2004 16:51:25 -0000	1.17
@@ -52,7 +52,7 @@
 	textdomain (PACKAGE);
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_udp: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	/* initialize alarm signal handling */
 	signal (SIGALRM, socket_timeout_alarm_handler);

Index: check_fping.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_fping.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- check_fping.c	2 Dec 2004 14:54:35 -0000	1.17
+++ check_fping.c	2 Dec 2004 16:51:24 -0000	1.18
@@ -68,7 +68,7 @@
 	textdomain (PACKAGE);
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_fping: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	server = strscpy (server, server_name);
 

Index: check_users.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_users.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- check_users.c	2 Dec 2004 14:54:36 -0000	1.13
+++ check_users.c	2 Dec 2004 16:51:25 -0000	1.14
@@ -51,7 +51,7 @@
 	perf = strdup("");
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_users: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	/* run the command */
 	child_process = spopen (WHO_COMMAND);

Index: check_ping.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ping.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- check_ping.c	2 Dec 2004 14:54:35 -0000	1.32
+++ check_ping.c	2 Dec 2004 16:51:25 -0000	1.33
@@ -79,12 +79,11 @@
 	addresses[0] = NULL;
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_ping: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	/* Set signal handling and alarm */
 	if (signal (SIGALRM, popen_timeout_alarm_handler) == SIG_ERR) {
-		printf (_("Cannot catch SIGALRM"));
-		return STATE_UNKNOWN;
+		usage4 (_("Cannot catch SIGALRM"));
 	}
 
 	/* handle timeouts gracefully */

Index: check_dns.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dns.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- check_dns.c	2 Dec 2004 14:54:35 -0000	1.33
+++ check_dns.c	2 Dec 2004 16:51:24 -0000	1.34
@@ -68,12 +68,11 @@
 
 	/* Set signal handling and alarm */
 	if (signal (SIGALRM, popen_timeout_alarm_handler) == SIG_ERR) {
-		printf (_("Cannot catch SIGALRM"));
-		return STATE_UNKNOWN;
+		usage4 (_("Cannot catch SIGALRM"));
 	}
 
 	if (process_arguments (argc, argv) != TRUE) {
-		usage (_("check_dns: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 	}
 
 	/* get the command to run */

Index: check_swap.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_swap.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- check_swap.c	2 Dec 2004 14:54:35 -0000	1.34
+++ check_swap.c	2 Dec 2004 16:51:25 -0000	1.35
@@ -90,7 +90,7 @@
 	perf = strdup ("");
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("Incorrect arguments supplied\n"));
+		usage4 (_("Could not parse arguments"));
 
 #ifdef HAVE_PROC_MEMINFO
 	fp = fopen (PROC_MEMINFO, "r");

Index: check_hpjd.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_hpjd.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- check_hpjd.c	2 Dec 2004 14:54:35 -0000	1.23
+++ check_hpjd.c	2 Dec 2004 16:51:24 -0000	1.24
@@ -85,7 +85,7 @@
 	textdomain (PACKAGE);
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_hpjd: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments\n"));
 
 	/* removed ' 2>1' at end of command 10/27/1999 - EG */
 	/* create the query string */

Index: check_snmp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_snmp.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- check_snmp.c	2 Dec 2004 14:54:35 -0000	1.42
+++ check_snmp.c	2 Dec 2004 16:51:25 -0000	1.43
@@ -157,7 +157,7 @@
 	miblist = strdup (DEFAULT_MIBLIST);
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_snmp: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	/* create the command line to execute */
 	asprintf (&command_line, "%s -t 1 -r %d -m %s -v %s %s %s:%s %s",

Index: popen.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/popen.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- popen.c	2 Dec 2004 01:11:01 -0000	1.9
+++ popen.c	2 Dec 2004 16:51:25 -0000	1.10
@@ -112,6 +112,7 @@
 	/* there cannot be more args than characters */
 	argc = strlen (cmdstring) + 1;	/* add 1 for NULL termination */
 	argv = malloc (sizeof(char*)*argc);
+	
 	if (argv == NULL) {
 		printf ("Could not malloc argv array in popen()\n");
 		return NULL;

Index: check_real.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_real.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- check_real.c	2 Dec 2004 14:54:35 -0000	1.17
+++ check_real.c	2 Dec 2004 16:51:25 -0000	1.18
@@ -65,7 +65,7 @@
 	textdomain (PACKAGE);
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_real: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	/* initialize alarm signal handling */
 	signal (SIGALRM, socket_timeout_alarm_handler);

Index: check_mysql.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_mysql.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- check_mysql.c	2 Dec 2004 14:54:35 -0000	1.18
+++ check_mysql.c	2 Dec 2004 16:51:24 -0000	1.19
@@ -56,7 +56,7 @@
 	textdomain (PACKAGE);
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_mysql: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	/* initialize mysql  */
 	mysql_init (&mysql);

Index: check_dig.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dig.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- check_dig.c	2 Dec 2004 14:54:35 -0000	1.30
+++ check_dig.c	2 Dec 2004 16:51:24 -0000	1.31
@@ -66,10 +66,10 @@
 
 	/* Set signal handling and alarm */
 	if (signal (SIGALRM, popen_timeout_alarm_handler) == SIG_ERR)
-		usage (_("Cannot catch SIGALRM\n"));
+		usage4 (_("Cannot catch SIGALRM"));
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("Could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	/* get the command to run */
 	asprintf (&command_line, "%s @%s -p %d %s -t %s",

Index: check_ldap.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ldap.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- check_ldap.c	2 Dec 2004 14:54:35 -0000	1.19
+++ check_ldap.c	2 Dec 2004 16:51:24 -0000	1.20
@@ -73,7 +73,7 @@
 	textdomain (PACKAGE);
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_ldap: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	/* initialize alarm signal handling */
 	signal (SIGALRM, socket_timeout_alarm_handler);

Index: check_ups.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ups.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- check_ups.c	2 Dec 2004 14:54:36 -0000	1.19
+++ check_ups.c	2 Dec 2004 16:51:25 -0000	1.20
@@ -112,7 +112,7 @@
 	message = strdup ("");
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_ups: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	/* initialize alarm signal handling */
 	signal (SIGALRM, socket_timeout_alarm_handler);

Index: check_disk.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_disk.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- check_disk.c	2 Dec 2004 14:54:35 -0000	1.50
+++ check_disk.c	2 Dec 2004 16:51:24 -0000	1.51
@@ -164,7 +164,7 @@
 	mount_list = read_filesystem_list (0);
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_disk: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	for (me = mount_list; me; me = me->me_next) {
 

Index: check_nwstat.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_nwstat.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- check_nwstat.c	2 Dec 2004 14:54:35 -0000	1.19
+++ check_nwstat.c	2 Dec 2004 16:51:25 -0000	1.20
@@ -122,7 +122,7 @@
 	textdomain (PACKAGE);
 
 	if (process_arguments(argc,argv) != TRUE)
-		usage (_("check_nwstat: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	/* initialize alarm signal handling */
 	signal(SIGALRM,socket_timeout_alarm_handler);

Index: check_pgsql.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_pgsql.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- check_pgsql.c	2 Dec 2004 14:54:35 -0000	1.21
+++ check_pgsql.c	2 Dec 2004 16:51:25 -0000	1.22
@@ -133,12 +133,11 @@
 	textdomain (PACKAGE);
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_pgsql: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	/* Set signal handling and alarm */
 	if (signal (SIGALRM, timeout_alarm_handler) == SIG_ERR) {
-		printf (_("Cannot catch SIGALRM"));
-		return STATE_UNKNOWN;
+		usage4 (_("Cannot catch SIGALRM"));
 	}
 	alarm (timeout_interval);
 

Index: check_smtp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_smtp.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- check_smtp.c	2 Dec 2004 14:54:35 -0000	1.31
+++ check_smtp.c	2 Dec 2004 16:51:25 -0000	1.32
@@ -89,7 +89,7 @@
 	textdomain (PACKAGE);
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_smtp: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	/* initialize the HELO command with the localhostname */
 #ifndef HOST_MAX_BYTES

Index: check_game.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_game.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- check_game.c	2 Dec 2004 14:54:35 -0000	1.14
+++ check_game.c	2 Dec 2004 16:51:24 -0000	1.15
@@ -64,22 +64,9 @@
 	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
-
-//	result = process_arguments (argc, argv);
 	
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_game: could not parse arguments\n"));
-
-/*	if (result != OK) {
-		printf (_("Incorrect arguments supplied\n"));
-		printf ("\n");
-		print_revision (progname, revision);
-		printf ("Copyright (c) 1999 Ian Cass, Knowledge Matters Limited\n");
-		printf (_("License: GPL\n"));
-		printf ("\n");
-		return STATE_UNKNOWN;
-	}
-*/
+		usage4 (_("Could not parse arguments"));
 
 	result = STATE_OK;
 
@@ -312,6 +299,7 @@
 {
 	print_revision (progname, revision);
 
+	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);

Index: check_nagios.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_nagios.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- check_nagios.c	2 Dec 2004 14:54:35 -0000	1.15
+++ check_nagios.c	2 Dec 2004 16:51:25 -0000	1.16
@@ -66,12 +66,11 @@
 	textdomain (PACKAGE);
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_nagios: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
-	/* Set signal handling and alarm */
+	/* Set signal handling and alarm timeout */
 	if (signal (SIGALRM, timeout_alarm_handler) == SIG_ERR) {
-		printf (_("Cannot catch SIGALRM"));
-		return STATE_UNKNOWN;
+		usage4 (_("Cannot catch SIGALRM"));
 	}
 
 	/* handle timeouts gracefully... */

Index: check_procs.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_procs.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- check_procs.c	2 Dec 2004 14:54:35 -0000	1.32
+++ check_procs.c	2 Dec 2004 16:51:25 -0000	1.33
@@ -116,12 +116,11 @@
 	metric = METRIC_PROCS;
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_procs: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	/* Set signal handling and alarm timeout */
 	if (signal (SIGALRM, popen_timeout_alarm_handler) == SIG_ERR) {
-		printf (_("Cannot catch SIGALRM"));
-		return STATE_UNKNOWN;
+		usage4 (_("Cannot catch SIGALRM"));
 	}
 	alarm (timeout_interval);
 

Index: negate.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/negate.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- negate.c	2 Dec 2004 14:54:36 -0000	1.18
+++ negate.c	2 Dec 2004 16:51:25 -0000	1.19
@@ -84,7 +84,7 @@
 	textdomain (PACKAGE);
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("negate: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	/* Set signal handling and alarm */
 	if (signal (SIGALRM, timeout_alarm_handler) == SIG_ERR)
@@ -97,6 +97,7 @@
 		die (STATE_UNKNOWN, _("Could not open pipe: %s\n"), command_line);
 
 	child_stderr = fdopen (child_stderr_array[fileno (child_process)], "r");
+	
 	if (child_stderr == NULL) {
 		printf (_("Could not open stderr for %s\n"), command_line);
 	}

Index: check_nt.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_nt.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- check_nt.c	2 Dec 2004 14:54:35 -0000	1.28
+++ check_nt.c	2 Dec 2004 16:51:25 -0000	1.29
@@ -111,7 +111,7 @@
 	textdomain (PACKAGE);
 
 	if(process_arguments(argc,argv) != TRUE)
-		usage (_("check_nt: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 	/* initialize alarm signal handling */
 	signal(SIGALRM,socket_timeout_alarm_handler);

Index: check_load.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_load.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- check_load.c	2 Dec 2004 14:54:35 -0000	1.19
+++ check_load.c	2 Dec 2004 16:51:24 -0000	1.20
@@ -74,7 +74,7 @@
 	textdomain (PACKAGE);
 
 	if (process_arguments (argc, argv) != TRUE)
-		usage (_("check_load: could not parse arguments\n"));
+		usage4 (_("Could not parse arguments"));
 
 #if HAVE_GETLOADAVG==1
 	result = getloadavg (la, 3);





More information about the Commits mailing list