[Nagiosplug-checkins] nagiosplug/plugins check_dhcp.c,1.5,1.6 check_dns.c,1.46,1.47 check_ping.c,1.41,1.42 check_procs.c,1.42,1.43 check_smtp.c,1.41,1.42 check_snmp.c,1.51,1.52 check_swap.c,1.44,1.45 check_tcp.c,1.60,1.61
Benoit Mortier
opensides at users.sourceforge.net
Wed Dec 29 16:42:00 CET 2004
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9610/plugins
Modified Files:
check_dhcp.c check_dns.c check_ping.c check_procs.c
check_smtp.c check_snmp.c check_swap.c check_tcp.c
Log Message:
more internationalization fixes
internationalization freeze for beta1
Index: check_smtp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_smtp.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- check_smtp.c 28 Dec 2004 23:18:17 -0000 1.41
+++ check_smtp.c 30 Dec 2004 00:41:39 -0000 1.42
@@ -188,7 +188,7 @@
return STATE_UNKNOWN;
}
if(connect_STARTTLS() != OK) {
- printf (_("ERROR: Cannot create SSL context.\n"));
+ printf (_("CRITICAL - Cannot create SSL context.\n"));
return STATE_CRITICAL;
}
if ( check_cert ) {
@@ -197,7 +197,7 @@
X509_free(server_cert);
}
else {
- printf (_("ERROR: Cannot retrieve server certificate.\n"));
+ printf (_("CRITICAL - Cannot retrieve server certificate.\n"));
result = STATE_CRITICAL;
}
@@ -591,7 +591,7 @@
SSL_load_error_strings ();
if ((ctx = SSL_CTX_new (meth)) == NULL)
{
- printf(_("ERROR: Cannot create SSL context.\n"));
+ printf(_("CRITICAL - Cannot create SSL context.\n"));
return STATE_CRITICAL;
}
/* do the SSL handshake */
@@ -606,7 +606,7 @@
}
else
{
- printf (_("ERROR: Cannot initiate SSL handshake.\n"));
+ printf (_("CRITICAL - Cannot initiate SSL handshake.\n"));
}
/* this causes a seg faul
not sure why, being sloppy
@@ -632,7 +632,7 @@
/* Generate tm structure to process timestamp */
if (tm->type == V_ASN1_UTCTIME) {
if (tm->length < 10) {
- printf (_("ERROR: Wrong time format in certificate.\n"));
+ printf (_("CRITICAL - Wrong time format in certificate.\n"));
return STATE_CRITICAL;
}
else {
@@ -644,7 +644,7 @@
}
else {
if (tm->length < 12) {
- printf (_("ERROR: Wrong time format in certificate.\n"));
+ printf (_("CRITICAL - Wrong time format in certificate.\n"));
return STATE_CRITICAL;
}
else {
Index: check_dhcp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dhcp.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- check_dhcp.c 25 Dec 2004 12:09:20 -0000 1.5
+++ check_dhcp.c 30 Dec 2004 00:41:39 -0000 1.6
@@ -927,7 +927,7 @@
printf(_(", %s%d of %d requested servers responded"),((requested_responses<requested_servers) && requested_responses>0)?"only ":"",requested_responses,requested_servers);
if(request_specific_address==TRUE)
- printf(_(", requested address (%s) was %soffered"),inet_ntoa(requested_address),(received_requested_address==TRUE)?"":"not ");
+ printf(_(", requested address (%s) was %soffered"),inet_ntoa(requested_address),(received_requested_address==TRUE)?"":_("not "));
printf(_(", max lease time = "));
if(max_lease_time==DHCP_INFINITE_TIME)
@@ -1048,23 +1048,19 @@
break;
case 'V': /* version */
-
- /*print_revision(progname,"$Revision$");*/
+ print_revision(progname,revision);
exit(STATE_OK);
case 'h': /* help */
-
print_help();
exit(STATE_OK);
case 'v': /* verbose */
-
verbose=1;
break;
case '?': /* help */
-
- /*usage("Invalid argument\n");*/
+ usage2 (_("Unknown argument"), optarg);
break;
default:
@@ -1076,7 +1072,6 @@
}
-
int validate_arguments(void){
return OK;
Index: check_procs.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_procs.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- check_procs.c 25 Dec 2004 23:17:44 -0000 1.42
+++ check_procs.c 30 Dec 2004 00:41:39 -0000 1.43
@@ -249,7 +249,7 @@
/* If we get anything on STDERR, at least set warning */
while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr)) {
if (verbose)
- printf (_("STDERR: %s"), input_buffer);
+ printf ("STDERR: %s", input_buffer);
result = max_state (result, STATE_WARNING);
printf (_("System call sent warnings to stderr\n"));
}
@@ -412,7 +412,7 @@
uid = pw->pw_uid;
}
user = pw->pw_name;
- asprintf (&fmt, _("%s%sUID = %d (%s)"), (fmt ? fmt : ""), (options ? ", " : ""),
+ asprintf (&fmt, "%s%sUID = %d (%s)", (fmt ? fmt : ""), (options ? ", " : ""),
uid, user);
options |= USER;
break;
@@ -432,19 +432,19 @@
break;
else
args = optarg;
- asprintf (&fmt, _("%s%sargs '%s'"), (fmt ? fmt : ""), (options ? ", " : ""), args);
+ asprintf (&fmt, "%s%sargs '%s'", (fmt ? fmt : ""), (options ? ", " : ""), args);
options |= ARGS;
break;
case 'r': /* RSS */
if (sscanf (optarg, "%d%[^0-9]", &rss, tmp) == 1) {
- asprintf (&fmt, _("%s%sRSS >= %d"), (fmt ? fmt : ""), (options ? ", " : ""), rss);
+ asprintf (&fmt, "%s%sRSS >= %d", (fmt ? fmt : ""), (options ? ", " : ""), rss);
options |= RSS;
break;
}
usage4 (_("RSS must be an integer!"));
case 'z': /* VSZ */
if (sscanf (optarg, "%d%[^0-9]", &vsz, tmp) == 1) {
- asprintf (&fmt, _("%s%sVSZ >= %d"), (fmt ? fmt : ""), (options ? ", " : ""), vsz);
+ asprintf (&fmt, "%s%sVSZ >= %d", (fmt ? fmt : ""), (options ? ", " : ""), vsz);
options |= VSZ;
break;
}
@@ -452,7 +452,7 @@
case 'P': /* PCPU */
/* TODO: -P 1.5.5 is accepted */
if (sscanf (optarg, "%f%[^0-9.]", &pcpu, tmp) == 1) {
- asprintf (&fmt, _("%s%sPCPU >= %.2f"), (fmt ? fmt : ""), (options ? ", " : ""), pcpu);
+ asprintf (&fmt, "%s%sPCPU >= %.2f", (fmt ? fmt : ""), (options ? ", " : ""), pcpu);
options |= PCPU;
break;
}
Index: check_ping.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ping.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- check_ping.c 28 Dec 2004 22:34:42 -0000 1.41
+++ check_ping.c 30 Dec 2004 00:41:39 -0000 1.42
@@ -403,7 +403,7 @@
int result = STATE_UNKNOWN;
if ((child_process = spopen (cmd)) == NULL)
- die (STATE_UNKNOWN, _("Cannot open pipe: %s"), cmd);
+ die (STATE_UNKNOWN, _("Could not open pipe: %s\n"), cmd);
child_stderr = fdopen (child_stderr_array[fileno (child_process)], "r");
if (child_stderr == NULL)
Index: check_snmp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_snmp.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- check_snmp.c 25 Dec 2004 23:17:44 -0000 1.51
+++ check_snmp.c 30 Dec 2004 00:41:39 -0000 1.52
@@ -281,7 +281,7 @@
iresult = STATE_CRITICAL;
}
#else
- printf (_("%s UNKNOWN: call for regex which was not a compiled option"), label);
+ printf (_("Call for regex which was not a compiled option"));
exit (STATE_UNKNOWN);
#endif
}
@@ -511,7 +511,7 @@
eval_method[jj++] = CRIT_REGEX;
ii++;
#else
- printf (_("%s UNKNOWN: call for regex which was not a compiled option"), label);
+ printf (_("call for regex which was not a compiled option"));
exit (STATE_UNKNOWN);
#endif
break;
@@ -530,8 +530,7 @@
labels_size += 8;
labels = realloc (labels, labels_size);
if (labels == NULL)
- die (STATE_UNKNOWN,
- _("Could not realloc() labels[%d]"), nlabels);
+ die (STATE_UNKNOWN, _("Could not reallocate labels[%d]"), nlabels);
}
labels[nlabels - 1] = optarg;
ptr = thisarg (optarg);
@@ -543,7 +542,7 @@
labels_size += 8;
labels = realloc (labels, labels_size);
if (labels == NULL)
- die (STATE_UNKNOWN, _("Could not realloc() labels\n"));
+ die (STATE_UNKNOWN, _("Could not reallocate labels\n"));
}
labels++;
ptr = thisarg (ptr);
@@ -560,8 +559,7 @@
unitv_size += 8;
unitv = realloc (unitv, unitv_size);
if (unitv == NULL)
- die (STATE_UNKNOWN,
- _("Could not realloc() units [%d]\n"), nunits);
+ die (STATE_UNKNOWN, _("Could not reallocate units [%d]\n"), nunits);
}
unitv[nunits - 1] = optarg;
ptr = thisarg (optarg);
@@ -646,7 +644,7 @@
}
else if ( strcmp(seclevel, "authNoPriv") == 0 ) {
if ( secname == NULL || authpasswd == NULL) {
- printf (_("Missing secname (%s) or authpassword (%s) ! \n)"),secname, authpasswd );
+ printf (_("Missing secname (%s) or authpassword (%s) ! \n"),secname, authpasswd );
print_usage ();
exit (STATE_UNKNOWN);
}
@@ -663,9 +661,7 @@
}
else {
- printf (_("Invalid SNMP version: %s\n"), proto);
- print_usage ();
- exit (STATE_UNKNOWN);
+ usage2 (_("Invalid SNMP version"), proto);
}
return OK;
Index: check_tcp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_tcp.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- check_tcp.c 25 Dec 2004 23:17:44 -0000 1.60
+++ check_tcp.c 30 Dec 2004 00:41:40 -0000 1.61
@@ -581,7 +581,7 @@
case 'S':
use_ssl = TRUE;
#else
- die (STATE_UNKNOWN, _("SSL support not available. Install OpenSSL and recompile."));
+ die (STATE_UNKNOWN, _("Invalid option - SSL is not available"));
#endif
break;
}
Index: check_dns.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dns.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- check_dns.c 25 Dec 2004 23:17:44 -0000 1.46
+++ check_dns.c 30 Dec 2004 00:41:39 -0000 1.47
@@ -224,9 +224,9 @@
{
/* the DNS lookup timed out */
- if (strstr (input_buffer, "Note: nslookup is deprecated and may be removed from future releases.") ||
- strstr (input_buffer, "Consider using the `dig' or `host' programs instead. Run nslookup with") ||
- strstr (input_buffer, "the `-sil[ent]' option to prevent this message from appearing."))
+ if (strstr (input_buffer, _("Note: nslookup is deprecated and may be removed from future releases.")) ||
+ strstr (input_buffer, _("Consider using the `dig' or `host' programs instead. Run nslookup with")) ||
+ strstr (input_buffer, _("the `-sil[ent]' option to prevent this message from appearing.")))
return STATE_OK;
/* DNS server is not running... */
Index: check_swap.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_swap.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- check_swap.c 25 Dec 2004 23:17:44 -0000 1.44
+++ check_swap.c 30 Dec 2004 00:41:39 -0000 1.45
@@ -405,7 +405,7 @@
break;
}
else {
- usage (_("Critical threshold must be integer or percentage!\n"));
+ usage4 (_("Critical threshold must be integer or percentage!"));
}
case 'a': /* all swap */
allswaps = TRUE;
@@ -458,12 +458,12 @@
return ERROR;
}
else if (warn_percent < crit_percent) {
- usage
- (_("Warning percentage should be more than critical percentage\n"));
+ usage4
+ (_("Warning percentage should be more than critical percentage"));
}
else if (warn_size < crit_size) {
- usage
- (_("Warning free space should be more than critical free space\n"));
+ usage4
+ (_("Warning free space should be more than critical free space"));
}
return OK;
}
More information about the Commits
mailing list