[Nagiosplug-checkins] CVS: nagiosplug/plugins check_fping.c,1.6,1.7 check_game.c,1.4,1.5 check_mysql.c,1.8,1.9 check_snmp.c,1.29,1.30 utils.h,1.8,1.9
Karl DeBisschop
kdebisschop at users.sourceforge.net
Sat Aug 2 15:07:02 CEST 2003
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv26700
Modified Files:
check_fping.c check_game.c check_mysql.c check_snmp.c utils.h
Log Message:
markupf for translation
Index: check_fping.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_fping.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** check_fping.c 2 Aug 2003 18:22:15 -0000 1.6
--- check_fping.c 2 Aug 2003 22:06:06 -0000 1.7
***************
*** 89,93 ****
}
!
int textscan (char *buf);
int process_arguments (int, char **);
--- 89,93 ----
}
!
int textscan (char *buf);
int process_arguments (int, char **);
***************
*** 113,117 ****
if (process_arguments (argc, argv) == ERROR)
! usage ("Could not parse arguments\n");
server = strscpy (server, server_name);
--- 113,117 ----
if (process_arguments (argc, argv) == ERROR)
! usage (_("Could not parse arguments\n"));
server = strscpy (server, server_name);
***************
*** 127,131 ****
child_process = spopen (command_line);
if (child_process == NULL) {
! printf ("Unable to open pipe: %s\n", command_line);
return STATE_UNKNOWN;
}
--- 127,131 ----
child_process = spopen (command_line);
if (child_process == NULL) {
! printf (_("Unable to open pipe: %s\n"), command_line);
return STATE_UNKNOWN;
}
***************
*** 133,137 ****
child_stderr = fdopen (child_stderr_array[fileno (child_process)], "r");
if (child_stderr == NULL) {
! printf ("Could not open stderr for %s\n", command_line);
}
--- 133,137 ----
child_stderr = fdopen (child_stderr_array[fileno (child_process)], "r");
if (child_stderr == NULL) {
! printf (_("Could not open stderr for %s\n"), command_line);
}
***************
*** 174,187 ****
if (strstr (buf, "not found")) {
! terminate (STATE_CRITICAL, "FPING unknown - %s not found\n", server_name);
}
else if (strstr (buf, "is unreachable") || strstr (buf, "Unreachable")) {
! terminate (STATE_CRITICAL, "FPING critical - %s is unreachable\n",
"host");
}
else if (strstr (buf, "is down")) {
! terminate (STATE_CRITICAL, "FPING critical - %s is down\n", server_name);
}
--- 174,187 ----
if (strstr (buf, "not found")) {
! terminate (STATE_CRITICAL, _("FPING unknown - %s not found\n"), server_name);
}
else if (strstr (buf, "is unreachable") || strstr (buf, "Unreachable")) {
! terminate (STATE_CRITICAL, _("FPING critical - %s is unreachable\n"),
"host");
}
else if (strstr (buf, "is down")) {
! terminate (STATE_CRITICAL, _("FPING critical - %s is down\n"), server_name);
}
***************
*** 209,213 ****
else
status = STATE_OK;
! terminate (status, "FPING %s - %s (loss=%f%%, rta=%f ms)\n",
state_text (status), server_name, loss, rta);
--- 209,213 ----
else
status = STATE_OK;
! terminate (status, _("FPING %s - %s (loss=%f%%, rta=%f ms)\n"),
state_text (status), server_name, loss, rta);
***************
*** 228,232 ****
status = STATE_OK;
! terminate (status, "FPING %s - %s (loss=%f%% )\n",
state_text (status), server_name, loss );
--- 228,232 ----
status = STATE_OK;
! terminate (status, _("FPING %s - %s (loss=%f%% )\n"),
state_text (status), server_name, loss );
***************
*** 238,242 ****
return status;
}
!
--- 238,242 ----
return status;
}
!
***************
*** 283,287 ****
switch (c) {
case '?': /* print short usage statement if args not parsable */
! printf ("%s: Unknown argument: %s\n\n", progname, optarg);
print_usage ();
exit (STATE_UNKNOWN);
--- 283,287 ----
switch (c) {
case '?': /* print short usage statement if args not parsable */
! printf (_("%s: Unknown argument: %s\n\n"), progname, optarg);
print_usage ();
exit (STATE_UNKNOWN);
***************
*** 290,294 ****
exit (STATE_OK);
case 'V': /* version */
! print_revision (progname, "$Revision$");
exit (STATE_OK);
case 'v': /* verbose mode */
--- 290,294 ----
exit (STATE_OK);
case 'V': /* version */
! print_revision (progname, revision);
exit (STATE_OK);
case 'v': /* verbose mode */
***************
*** 297,301 ****
case 'H': /* hostname */
if (is_host (optarg) == FALSE) {
! printf ("Invalid host name/address\n\n");
print_usage ();
exit (STATE_UNKNOWN);
--- 297,301 ----
case 'H': /* hostname */
if (is_host (optarg) == FALSE) {
! printf (_("Invalid host name/address\n\n"));
print_usage ();
exit (STATE_UNKNOWN);
***************
*** 329,333 ****
packet_size = atoi (optarg);
else
! usage ("Packet size must be a positive integer");
break;
case 'n': /* number of packets */
--- 329,333 ----
packet_size = atoi (optarg);
else
! usage (_("Packet size must be a positive integer"));
break;
case 'n': /* number of packets */
***************
*** 335,339 ****
packet_count = atoi (optarg);
else
! usage ("Packet count must be a positive integer");
break;
}
--- 335,339 ----
packet_count = atoi (optarg);
else
! usage (_("Packet count must be a positive integer"));
break;
}
***************
*** 342,346 ****
if (server_name == NULL)
! usage ("Host name was not supplied\n\n");
return OK;
--- 342,346 ----
if (server_name == NULL)
! usage (_("Host name was not supplied\n\n"));
return OK;
***************
*** 365,373 ****
if (strstr (arg1, "%") && strstr (arg2, "%"))
terminate (STATE_UNKNOWN,
! "%s: Only one threshold may be packet loss (%s)\n", progname,
arg);
if (!strstr (arg1, "%") && !strstr (arg2, "%"))
terminate (STATE_UNKNOWN,
! "%s: Only one threshold must be packet loss (%s)\n",
progname, arg);
}
--- 365,373 ----
if (strstr (arg1, "%") && strstr (arg2, "%"))
terminate (STATE_UNKNOWN,
! _("%s: Only one threshold may be packet loss (%s)\n"), progname,
arg);
if (!strstr (arg1, "%") && !strstr (arg2, "%"))
terminate (STATE_UNKNOWN,
! _("%s: Only one threshold must be packet loss (%s)\n"),
progname, arg);
}
Index: check_game.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_game.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** check_game.c 7 Apr 2003 11:38:15 -0000 1.4
--- check_game.c 2 Aug 2003 22:06:06 -0000 1.5
***************
*** 20,33 ****
const char *revision = "$Revision$";
const char *copyright = "2002-2003";
- const char *authors = "Nagios Plugin Development Team";
const char *email = "nagiosplug-devel at lists.sourceforge.net";
! const char *summary = "\
! This plugin tests %s connections with the specified host.\n";
! const char *option_summary = "\
! %s <game> <ip_address> [-p port] [-gf game_field] [-mf map_field] [-pf ping_field]\n";
! const char *options = "\
<game> = Game type that is recognised by qstat (without the leading dash)\n\
<ip_address> = The IP address of the device you wish to query\n\
--- 20,52 ----
const char *revision = "$Revision$";
const char *copyright = "2002-2003";
const char *email = "nagiosplug-devel at lists.sourceforge.net";
! #include "common.h"
! #include "popen.h"
! #include "utils.h"
! void
! print_usage (void)
! {
! printf (_("\
! Usage: %s <game> <ip_address> [-p port] [-gf game_field] [-mf map_field]\n\
! [-pf ping_field]\n"), progname);
! printf (_(UT_HLP_VRS), progname, progname);
! }
! void
! print_help (void)
! {
! print_revision (progname, revision);
!
! printf (_(COPYRIGHT), copyright, email);
!
! printf (_("This plugin tests %s connections with the specified host."), progname);
!
! print_usage ();
!
! printf (_(UT_HELP_VRSN));
!
! printf (_("\
<game> = Game type that is recognised by qstat (without the leading dash)\n\
<ip_address> = The IP address of the device you wish to query\n\
***************
*** 35,51 ****
[game_field] = Field number in raw qstat output that contains game name\n\
[map_field] = Field number in raw qstat output that contains map name\n\
! [ping_field] = Field number in raw qstat output that contains ping time\n\
! \n\
Notes:\n\
- This plugin uses the 'qstat' command, the popular game server status query tool .\n\
If you don't have the package installed, you will need to download it from\n\
! http://www.activesw.com/people/steve/qstat.html before you can use this plugin.\n";
! #include "common.h"
! #include "popen.h"
! #include "utils.h"
!
! void print_usage (void);
! void print_help (void);
int process_arguments (int, char **);
int validate_arguments (void);
--- 54,69 ----
[game_field] = Field number in raw qstat output that contains game name\n\
[map_field] = Field number in raw qstat output that contains map name\n\
! [ping_field] = Field number in raw qstat output that contains ping time\n"),
! DEFAULT_SOCKET_TIMEOUT);
!
! printf (_("\n\
Notes:\n\
- This plugin uses the 'qstat' command, the popular game server status query tool .\n\
If you don't have the package installed, you will need to download it from\n\
! http://www.activesw.com/people/steve/qstat.html before you can use this plugin.\n"));
! printf (_(UT_SUPPORT));
! }
!
int process_arguments (int, char **);
int validate_arguments (void);
***************
*** 84,92 ****
if (result != OK) {
! printf ("Incorrect arguments supplied\n");
printf ("\n");
! print_revision (argv[0], "$Revision$");
! printf ("Copyright (c) 1999 Ian Cass, Knowledge Matters Limited\n");
! printf ("License: GPL\n");
printf ("\n");
return STATE_UNKNOWN;
--- 102,110 ----
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;
***************
*** 108,112 ****
fp = spopen (command_line);
if (fp == NULL) {
! printf ("Error - Could not open pipe: %s\n", command_line);
return STATE_UNKNOWN;
}
--- 126,130 ----
fp = spopen (command_line);
if (fp == NULL) {
! printf (_("Error - Could not open pipe: %s\n"), command_line);
return STATE_UNKNOWN;
}
***************
*** 128,132 ****
if (!strncmp (input_buffer, "unknown option", 14)) {
! printf ("ERROR: Host type parameter incorrect!\n");
result = STATE_CRITICAL;
return result;
--- 146,150 ----
if (!strncmp (input_buffer, "unknown option", 14)) {
! printf (_("ERROR: Host type parameter incorrect!\n"));
result = STATE_CRITICAL;
return result;
***************
*** 218,222 ****
switch (c) {
case '?': /* args not parsable */
! printf ("%s: Unknown argument: %s\n\n", progname, optarg);
print_usage ();
exit (STATE_UNKNOWN);
--- 236,240 ----
switch (c) {
case '?': /* args not parsable */
! printf (_("%s: Unknown argument: %s\n\n"), progname, optarg);
print_usage ();
exit (STATE_UNKNOWN);
***************
*** 235,239 ****
case 'H': /* hostname */
if (strlen (optarg) >= MAX_HOST_ADDRESS_LENGTH)
! terminate (STATE_UNKNOWN, "Input buffer overflow\n");
server_ip = strdup (optarg);
break;
--- 253,257 ----
case 'H': /* hostname */
if (strlen (optarg) >= MAX_HOST_ADDRESS_LENGTH)
! terminate (STATE_UNKNOWN, _("Input buffer overflow\n"));
server_ip = strdup (optarg);
break;
***************
*** 243,247 ****
case 'G': /* hostname */
if (strlen (optarg) >= MAX_INPUT_BUFFER)
! terminate (STATE_UNKNOWN, "Input buffer overflow\n");
game_type = strdup (optarg);
break;
--- 261,265 ----
case 'G': /* hostname */
if (strlen (optarg) >= MAX_INPUT_BUFFER)
! terminate (STATE_UNKNOWN, _("Input buffer overflow\n"));
game_type = strdup (optarg);
break;
***************
*** 291,316 ****
return OK;
}
-
-
- void
- print_help (void)
- {
- print_revision (progname, revision);
- printf ("Copyright (c) %s %s\n\t<%s>\n\n",
- copyright, authors, email);
- printf (summary, progname);
- print_usage ();
- printf ("\nOptions:\n");
- printf (options, DEFAULT_SOCKET_TIMEOUT);
- support ();
- }
-
- void
- print_usage (void)
- {
- printf
- ("Usage: %s %s\n"
- " %s (-h|--help)\n"
- " %s (-V|--version)\n", progname, option_summary, progname, progname);
- }
-
--- 309,310 ----
Index: check_mysql.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_mysql.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** check_mysql.c 11 Mar 2003 22:22:11 -0000 1.8
--- check_mysql.c 2 Aug 2003 22:06:06 -0000 1.9
***************
*** 16,38 ****
const char *progname = "check_mysql";
! #define REVISION "$Revision$"
! #define COPYRIGHT "1999-2002"
#include "common.h"
#include "utils.h"
!
#include <mysql/mysql.h>
#include <mysql/errmsg.h>
char *db_user = "";
char *db_host = "";
char *db_pass = "";
char *db = "";
- unsigned int db_port = MYSQL_PORT;
int process_arguments (int, char **);
int validate_arguments (void);
- void print_help (void);
- void print_usage (void);
int
--- 16,79 ----
const char *progname = "check_mysql";
! const char *revision = "$Revision$";
! const char *copyright = "1999-2002";
! const char *email = "nagiosplug-devel at lists.sourceforge.net";
#include "common.h"
#include "utils.h"
! #include "netutils.h"
#include <mysql/mysql.h>
#include <mysql/errmsg.h>
+ unsigned int db_port = MYSQL_PORT;
+
+ void
+ print_usage (void)
+ {
+ printf (_("\
+ Usage: %s [-d database] [-H host] [-P port] [-u user] [-p password]\n"),
+ progname);
+ printf (_(UT_HLP_VRS), progname, progname);
+ }
+
+ void
+ print_help (void)
+ {
+ print_revision (progname, revision);
+
+ printf (_(COPYRIGHT), copyright, email);
+
+ printf (_("This program tests connections to a mysql server\n"));
+
+ print_usage ();
+
+ printf (_(UT_HELP_VRSN));
+
+ printf (_(UT_HOST_PORT), 'P', atoi(MYSQL_PORT));
+
+ printf (_("\
+ -d, --database=STRING\n\
+ Check database with indicated name\n\
+ -u, --username=STRING\n\
+ Connect using the indicated username\n\
+ -p, --password=STRING\n\
+ Use the indicated password to authenticate the connection\n\
+ ==> IMPORTANT: THIS FORM OF AUTHENTICATION IS NOT SECURE!!! <==\n\
+ Your clear-text password will be visible as a process table entry\n"));
+
+ printf (_("\n\
+ There are no required arguments. By default, the local database with\n\
+ a server listening on MySQL standard port %d will be checked\n"), MYSQL_PORT);
+
+ printf (_(UT_SUPPORT));
+ }
+
char *db_user = "";
char *db_host = "";
char *db_pass = "";
char *db = "";
int process_arguments (int, char **);
int validate_arguments (void);
int
***************
*** 44,48 ****
if (process_arguments (argc, argv) != OK)
! usage ("Invalid command arguments supplied\n");
/* initialize mysql */
--- 85,89 ----
if (process_arguments (argc, argv) != OK)
! usage (_("Invalid command arguments supplied\n"));
/* initialize mysql */
***************
*** 155,159 ****
}
else {
! usage ("Invalid host name\n");
}
break;
--- 196,200 ----
}
else {
! usage (_("Invalid host name\n"));
}
break;
***************
*** 171,175 ****
break;
case 'V': /* version */
! print_revision (progname, REVISION);
exit (STATE_OK);
case 'h': /* help */
--- 212,216 ----
break;
case 'V': /* version */
! print_revision (progname, revision);
exit (STATE_OK);
case 'h': /* help */
***************
*** 177,181 ****
exit (STATE_OK);
case '?': /* help */
! usage ("Invalid argument\n");
}
}
--- 218,222 ----
exit (STATE_OK);
case '?': /* help */
! usage (_("Invalid argument\n"));
}
}
***************
*** 215,264 ****
{
return OK;
- }
-
-
-
-
-
- void
- print_help (void)
- {
- print_revision (progname, REVISION);
- printf
- ("Copyright (c) 2000 Didi Rieder/Karl DeBisschop\n\n"
- "This plugin is for testing a mysql server.\n");
- print_usage ();
- printf
- ("\nThere are no required arguments. By default, the local database with\n"
- "a server listening on MySQL standard port %d will be checked\n\n"
- "Options:\n"
- " -d, --database=STRING\n"
- " Check database with indicated name\n"
- " -H, --hostname=STRING or IPADDRESS\n"
- " Check server on the indicated host\n"
- " -P, --port=INTEGER\n"
- " Make connection on the indicated port\n"
- " -u, --username=STRING\n"
- " Connect using the indicated username\n"
- " -p, --password=STRING\n"
- " Use the indicated password to authenticate the connection\n"
- " ==> IMPORTANT: THIS FORM OF AUTHENTICATION IS NOT SECURE!!! <==\n"
- " Your clear-text password will be visible as a process table entry\n"
- " -h, --help\n"
- " Print detailed help screen\n"
- " -V, --version\n" " Print version information\n\n", MYSQL_PORT);
- support ();
- }
-
-
-
-
-
- void
- print_usage (void)
- {
- printf
- ("Usage: %s [-d database] [-H host] [-P port] [-u user] [-p password]\n"
- " %s --help\n"
- " %s --version\n", progname, progname, progname);
}
--- 256,258 ----
Index: check_snmp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_snmp.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** check_snmp.c 2 Aug 2003 18:22:15 -0000 1.29
--- check_snmp.c 2 Aug 2003 22:06:06 -0000 1.30
***************
*** 44,48 ****
print_usage (void)
{
! printf ("\
Usage: %s -H <ip_address> -o <OID> [-w warn_range] [-c crit_range] \n\
[-C community] [-s string] [-r regex] [-R regexi] [-t timeout]\n\
--- 44,48 ----
print_usage (void)
{
! printf (_("\
Usage: %s -H <ip_address> -o <OID> [-w warn_range] [-c crit_range] \n\
[-C community] [-s string] [-r regex] [-R regexi] [-t timeout]\n\
***************
*** 50,59 ****
[-D output-delimiter] [-m miblist] [-P snmp version]\n\
[-L seclevel] [-U secname] [-a authproto] [-A authpasswd]\n\
! [-X privpasswd]\n",
! progname);
! printf ("\
! %s (-h | --help) for detailed help\n\
! %s (-V | --version) for version information\n",
! progname, progname);
}
--- 50,55 ----
[-D output-delimiter] [-m miblist] [-P snmp version]\n\
[-L seclevel] [-U secname] [-a authproto] [-A authpasswd]\n\
! [-X privpasswd]\n"), progname);
! printf (_(UT_HLP_VRS), progname, progname);
}
***************
*** 161,165 ****
returned from the SNMP query is an unsigned integer.\n"));
! support ();
}
--- 157,161 ----
returned from the SNMP query is an unsigned integer.\n"));
! printf (_(UT_SUPPORT));
}
***************
*** 272,276 ****
if (process_arguments (argc, argv) == ERROR)
! usage ("Incorrect arguments supplied\n");
/* create the command line to execute */
--- 268,272 ----
if (process_arguments (argc, argv) == ERROR)
! usage (_("Incorrect arguments supplied\n"));
/* create the command line to execute */
***************
*** 284,288 ****
child_process = spopen (command_line);
if (child_process == NULL) {
! printf ("Could not open pipe: %s\n", command_line);
exit (STATE_UNKNOWN);
}
--- 280,284 ----
child_process = spopen (command_line);
if (child_process == NULL) {
! printf (_("Could not open pipe: %s\n"), command_line);
exit (STATE_UNKNOWN);
}
***************
*** 290,294 ****
child_stderr = fdopen (child_stderr_array[fileno (child_process)], "r");
if (child_stderr == NULL) {
! printf ("Could not open stderr for %s\n", command_line);
}
--- 286,290 ----
child_stderr = fdopen (child_stderr_array[fileno (child_process)], "r");
if (child_stderr == NULL) {
! printf (_("Could not open stderr for %s\n"), command_line);
}
***************
*** 389,393 ****
else if (excode != REG_NOMATCH) {
regerror (excode, &preg, errbuf, MAX_INPUT_BUFFER);
! printf ("Execute Error: %s\n", errbuf);
exit (STATE_CRITICAL);
}
--- 385,389 ----
else if (excode != REG_NOMATCH) {
regerror (excode, &preg, errbuf, MAX_INPUT_BUFFER);
! printf (_("Execute Error: %s\n"), errbuf);
exit (STATE_CRITICAL);
}
***************
*** 396,400 ****
}
#else
! printf ("%s UNKNOWN: call for regex which was not a compiled option", label);
exit (STATE_UNKNOWN);
#endif
--- 392,396 ----
}
#else
! printf (_("%s UNKNOWN: call for regex which was not a compiled option"), label);
exit (STATE_UNKNOWN);
#endif
***************
*** 434,438 ****
terminate
(STATE_UNKNOWN,
! "%s problem - No data recieved from host\nCMD: %s\n",
label, command_line);
--- 430,434 ----
terminate
(STATE_UNKNOWN,
! _("%s problem - No data recieved from host\nCMD: %s\n"),
label, command_line);
***************
*** 555,559 ****
case 't': /* timeout period */
if (!is_integer (optarg))
! usage2 ("Timeout Interval must be an integer", optarg);
timeout_interval = atoi (optarg);
break;
--- 551,555 ----
case 't': /* timeout period */
if (!is_integer (optarg))
! usage2 (_("Timeout Interval must be an integer"), optarg);
timeout_interval = atoi (optarg);
break;
***************
*** 562,566 ****
case 'c': /* critical time threshold */
if (strspn (optarg, "0123456789:,") < strlen (optarg)) {
! printf ("Invalid critical threshold: %s\n", optarg);
print_usage ();
exit (STATE_UNKNOWN);
--- 558,562 ----
case 'c': /* critical time threshold */
if (strspn (optarg, "0123456789:,") < strlen (optarg)) {
! printf (_("Invalid critical threshold: %s\n"), optarg);
print_usage ();
exit (STATE_UNKNOWN);
***************
*** 576,580 ****
case 'w': /* warning time threshold */
if (strspn (optarg, "0123456789:,") < strlen (optarg)) {
! printf ("Invalid warning threshold: %s\n", optarg);
print_usage ();
exit (STATE_UNKNOWN);
--- 572,576 ----
case 'w': /* warning time threshold */
if (strspn (optarg, "0123456789:,") < strlen (optarg)) {
! printf (_("Invalid warning threshold: %s\n"), optarg);
print_usage ();
exit (STATE_UNKNOWN);
***************
*** 623,627 ****
if (errcode != 0) {
regerror (errcode, &preg, errbuf, MAX_INPUT_BUFFER);
! printf ("Could Not Compile Regular Expression");
return ERROR;
}
--- 619,623 ----
if (errcode != 0) {
regerror (errcode, &preg, errbuf, MAX_INPUT_BUFFER);
! printf (_("Could Not Compile Regular Expression"));
return ERROR;
}
***************
*** 629,633 ****
ii++;
#else
! printf ("%s UNKNOWN: call for regex which was not a compiled option", label);
exit (STATE_UNKNOWN);
#endif
--- 625,629 ----
ii++;
#else
! printf (_("%s UNKNOWN: call for regex which was not a compiled option"), label);
exit (STATE_UNKNOWN);
#endif
***************
*** 649,653 ****
if (labels == NULL)
terminate (STATE_UNKNOWN,
! "Could not realloc() labels[%d]", nlabels);
}
labels[nlabels - 1] = optarg;
--- 645,649 ----
if (labels == NULL)
terminate (STATE_UNKNOWN,
! _("Could not realloc() labels[%d]"), nlabels);
}
labels[nlabels - 1] = optarg;
***************
*** 662,666 ****
labels = realloc (labels, labels_size);
if (labels == NULL)
! terminate (STATE_UNKNOWN, "Could not realloc() labels\n");
}
labels++;
--- 658,662 ----
labels = realloc (labels, labels_size);
if (labels == NULL)
! terminate (STATE_UNKNOWN, _("Could not realloc() labels\n"));
}
labels++;
***************
*** 680,684 ****
if (unitv == NULL)
terminate (STATE_UNKNOWN,
! "Could not realloc() units [%d]\n", nunits);
}
unitv[nunits - 1] = optarg;
--- 676,680 ----
if (unitv == NULL)
terminate (STATE_UNKNOWN,
! _("Could not realloc() units [%d]\n"), nunits);
}
unitv[nunits - 1] = optarg;
***************
*** 693,697 ****
unitv = realloc (unitv, unitv_size);
if (units == NULL)
! terminate (STATE_UNKNOWN, "Could not realloc() units\n");
}
nunits++;
--- 689,693 ----
unitv = realloc (unitv, unitv_size);
if (units == NULL)
! terminate (STATE_UNKNOWN, _("Could not realloc() units\n"));
}
nunits++;
***************
*** 760,764 ****
else if ( strcmp(seclevel, "authNoPriv") == 0 ) {
if ( secname == NULL || authpasswd == NULL) {
! printf ("Missing secname (%s) or authpassword (%s) ! \n",secname, authpasswd );
print_usage ();
exit (STATE_UNKNOWN);
--- 756,760 ----
else if ( strcmp(seclevel, "authNoPriv") == 0 ) {
if ( secname == NULL || authpasswd == NULL) {
! printf (_("Missing secname (%s) or authpassword (%s) ! \n)"),secname, authpasswd );
print_usage ();
exit (STATE_UNKNOWN);
***************
*** 768,772 ****
else if ( strcmp(seclevel, "authPriv") == 0 ) {
if ( secname == NULL || authpasswd == NULL || privpasswd == NULL ) {
! printf ("Missing secname (%s), authpassword (%s), or privpasswd (%s)! \n",secname, authpasswd,privpasswd );
print_usage ();
exit (STATE_UNKNOWN);
--- 764,768 ----
else if ( strcmp(seclevel, "authPriv") == 0 ) {
if ( secname == NULL || authpasswd == NULL || privpasswd == NULL ) {
! printf (("Missing secname (%s), authpassword (%s), or privpasswd (%s)! \n"),secname, authpasswd,privpasswd );
print_usage ();
exit (STATE_UNKNOWN);
***************
*** 778,782 ****
}
else {
! printf ("Invalid SNMP version: %s\n", proto);
print_usage ();
exit (STATE_UNKNOWN);
--- 774,778 ----
}
else {
! printf (_("Invalid SNMP version: %s\n"), proto);
print_usage ();
exit (STATE_UNKNOWN);
Index: utils.h
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/utils.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** utils.h 2 Aug 2003 18:22:51 -0000 1.8
--- utils.h 2 Aug 2003 22:06:06 -0000 1.9
***************
*** 98,101 ****
--- 98,105 ----
\t<%s>\n\n"
+ #define UT_HLP_VRS "\
+ %s (-h | --help) for detailed help\n\
+ %s (-V | --version) for version information\n"
+
#define UT_HELP_VRSN "\
\nOptions:\n\
More information about the Commits
mailing list