mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-05-28 04:35:40 -04:00
first pass at standardization of messages for the localization
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@962 f882894a-f735-0410-b71e-b25c423dba1c
This commit is contained in:
parent
5dc0b02ccc
commit
54c21eba62
6 changed files with 22 additions and 33 deletions
|
|
@ -167,11 +167,6 @@ main (int argc, char **argv)
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* process command-line arguments */
|
||||
int
|
||||
process_arguments (int argc, char **argv)
|
||||
|
|
@ -238,12 +233,12 @@ process_arguments (int argc, char **argv)
|
|||
break;
|
||||
case 'H': /* host */
|
||||
if (!is_host (optarg))
|
||||
usage2 (_("Invalid host name"), optarg);
|
||||
usage2 (_("Invalid hostname/adress"), optarg);
|
||||
hostname = optarg;
|
||||
break;
|
||||
case 'p': /* port number */
|
||||
if (!is_integer (optarg))
|
||||
usage2 (_("port must be an integer"), optarg);
|
||||
usage2 (_("port must be a positive integer"), optarg);
|
||||
asprintf (&comm,"%s -p %s", comm, optarg);
|
||||
break;
|
||||
case 'O': /* output file */
|
||||
|
|
@ -340,10 +335,6 @@ validate_arguments (void)
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
print_help (void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ main (int argc, char **argv)
|
|||
if (spclose (child_process)) {
|
||||
result = max_state (result, STATE_WARNING);
|
||||
if (strlen (output) == 0)
|
||||
asprintf (&output, _("dig returned error status"));
|
||||
asprintf (&output, _("dig returned an error status"));
|
||||
}
|
||||
|
||||
microsec = deltime (tv);
|
||||
|
|
@ -183,7 +183,6 @@ main (int argc, char **argv)
|
|||
|
||||
|
||||
|
||||
|
||||
/* process command-line arguments */
|
||||
int
|
||||
process_arguments (int argc, char **argv)
|
||||
|
|
@ -228,7 +227,7 @@ process_arguments (int argc, char **argv)
|
|||
dns_server = optarg;
|
||||
}
|
||||
else {
|
||||
usage2 (_("Invalid host name"), optarg);
|
||||
usage2 (_("Invalid hostname/adress"), optarg);
|
||||
}
|
||||
break;
|
||||
case 'p': /* server port */
|
||||
|
|
@ -236,7 +235,7 @@ process_arguments (int argc, char **argv)
|
|||
server_port = atoi (optarg);
|
||||
}
|
||||
else {
|
||||
usage2 (_("Server port must be a nonnegative integer"), optarg);
|
||||
usage2 (_("port must be a positive integer"), optarg);
|
||||
}
|
||||
break;
|
||||
case 'l': /* address to lookup */
|
||||
|
|
@ -247,7 +246,7 @@ process_arguments (int argc, char **argv)
|
|||
warning_interval = strtod (optarg, NULL);
|
||||
}
|
||||
else {
|
||||
usage2 (_("Warning interval must be a nonnegative integer"), optarg);
|
||||
usage2 (_("Warning interval must be a positive integer"), optarg);
|
||||
}
|
||||
break;
|
||||
case 'c': /* critical */
|
||||
|
|
@ -255,7 +254,7 @@ process_arguments (int argc, char **argv)
|
|||
critical_interval = strtod (optarg, NULL);
|
||||
}
|
||||
else {
|
||||
usage2 (_("Critical interval must be a nonnegative integer"), optarg);
|
||||
usage2 (_("Critical interval must be a positive integer"), optarg);
|
||||
}
|
||||
break;
|
||||
case 't': /* timeout */
|
||||
|
|
@ -263,7 +262,7 @@ process_arguments (int argc, char **argv)
|
|||
timeout_interval = atoi (optarg);
|
||||
}
|
||||
else {
|
||||
usage2 (_("Time interval must be a nonnegative integer"), optarg);
|
||||
usage2 (_("Timeout interval must be a positive integer"), optarg);
|
||||
}
|
||||
break;
|
||||
case 'v': /* verbose */
|
||||
|
|
@ -285,7 +284,7 @@ process_arguments (int argc, char **argv)
|
|||
dns_server = argv[c];
|
||||
}
|
||||
else {
|
||||
usage2 (_("Invalid host name"), argv[c]);
|
||||
usage2 (_("Invalid hostname/adress"), argv[c]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
@ -311,7 +310,6 @@ validate_arguments (void)
|
|||
|
||||
|
||||
|
||||
|
||||
void
|
||||
print_help (void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -437,7 +437,7 @@ process_arguments (int argc, char **argv)
|
|||
print_help ();
|
||||
exit (STATE_OK);
|
||||
case '?': /* help */
|
||||
usage (_("check_disk: unrecognized option\n"));
|
||||
usage (_("Unknow argument\n"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -566,7 +566,6 @@ walk_name_list (struct name_list *list, const char *name)
|
|||
|
||||
|
||||
|
||||
|
||||
void
|
||||
print_help (void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ main (int argc, char **argv)
|
|||
printf (_("DNS CRITICAL - %s\n"),
|
||||
!strcmp (output, "") ? _(" Probably a non-existent host/domain") : output);
|
||||
else
|
||||
printf (_("DNS problem - %s\n"),
|
||||
printf (_("DNS UNKNOW - %s\n"),
|
||||
!strcmp (output, "") ? _(" Probably a non-existent host/domain") : output);
|
||||
|
||||
return result;
|
||||
|
|
@ -331,7 +331,7 @@ process_arguments (int argc, char **argv)
|
|||
case 'r': /* reverse server name */
|
||||
/* TODO: Is this is_host necessary? */
|
||||
if (is_host (optarg) == FALSE) {
|
||||
usage2 (_("Invalid host name/address"), optarg);
|
||||
usage2 (_("Invalid hostname/address"), optarg);
|
||||
}
|
||||
if (strlen (optarg) >= ADDRESS_LENGTH)
|
||||
die (STATE_UNKNOWN, _("Input buffer overflow\n"));
|
||||
|
|
@ -359,7 +359,7 @@ process_arguments (int argc, char **argv)
|
|||
if (strlen(dns_server)==0 && c<argc) {
|
||||
/* TODO: See -s option */
|
||||
if (is_host(argv[c]) == FALSE) {
|
||||
printf (_("Invalid name/address: %s\n\n"), argv[c]);
|
||||
printf (_("Invalid hostname/address: %s\n\n"), argv[c]);
|
||||
return ERROR;
|
||||
}
|
||||
if (strlen(argv[c]) >= ADDRESS_LENGTH)
|
||||
|
|
|
|||
|
|
@ -127,16 +127,16 @@ textscan (char *buf)
|
|||
int status = STATE_UNKNOWN;
|
||||
|
||||
if (strstr (buf, "not found")) {
|
||||
die (STATE_CRITICAL, _("FPING unknown - %s not found\n"), server_name);
|
||||
die (STATE_CRITICAL, _("FPING UNKNOW - %s not found\n"), server_name);
|
||||
|
||||
}
|
||||
else if (strstr (buf, "is unreachable") || strstr (buf, "Unreachable")) {
|
||||
die (STATE_CRITICAL, _("FPING critical - %s is unreachable\n"),
|
||||
die (STATE_CRITICAL, _("FPING CRITICAL - %s is unreachable\n"),
|
||||
"host");
|
||||
|
||||
}
|
||||
else if (strstr (buf, "is down")) {
|
||||
die (STATE_CRITICAL, _("FPING critical - %s is down\n"), server_name);
|
||||
die (STATE_CRITICAL, _("FPING CRITICAL - %s is down\n"), server_name);
|
||||
|
||||
}
|
||||
else if (strstr (buf, "is alive")) {
|
||||
|
|
@ -254,7 +254,7 @@ process_arguments (int argc, char **argv)
|
|||
break;
|
||||
case 'H': /* hostname */
|
||||
if (is_host (optarg) == FALSE) {
|
||||
usage2 (_("Invalid host name/address"), optarg);
|
||||
usage2 (_("Invalid hostname/address"), optarg);
|
||||
}
|
||||
server_name = strscpy (server_name, optarg);
|
||||
break;
|
||||
|
|
@ -301,7 +301,7 @@ process_arguments (int argc, char **argv)
|
|||
|
||||
|
||||
if (server_name == NULL)
|
||||
usage (_("Host name was not supplied\n\n"));
|
||||
usage (_("Hostname was not supplied\n\n"));
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,7 +104,8 @@ process_arguments (int argc, char **argv)
|
|||
|
||||
switch (c) {
|
||||
case '?': /* help */
|
||||
usage ("");
|
||||
usage (_("Unknow argument\n"));
|
||||
break;
|
||||
case 'V': /* version */
|
||||
print_revision (progname, revision);
|
||||
exit (STATE_OK);
|
||||
|
|
@ -135,7 +136,7 @@ process_arguments (int argc, char **argv)
|
|||
break;
|
||||
case 'H': /* host */
|
||||
if (is_host (optarg) == FALSE)
|
||||
usage2 (_("Invalid host name/address"), optarg);
|
||||
usage2 (_("Invalid hostname/address"), optarg);
|
||||
server_name = optarg;
|
||||
break;
|
||||
case 'p': /* port */
|
||||
|
|
@ -250,7 +251,7 @@ print_help (void)
|
|||
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 an SSH server at specified server and port\n\n"));
|
||||
|
||||
print_usage ();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue