diff options
Diffstat (limited to 'plugins/check_nagios.c')
-rw-r--r-- | plugins/check_nagios.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/plugins/check_nagios.c b/plugins/check_nagios.c index 465b409d..0176983c 100644 --- a/plugins/check_nagios.c +++ b/plugins/check_nagios.c | |||
@@ -95,7 +95,7 @@ main (int argc, char **argv) | |||
95 | fclose (fp); | 95 | fclose (fp); |
96 | 96 | ||
97 | if (verbose >= 2) | 97 | if (verbose >= 2) |
98 | printf("command: %s\n", PS_COMMAND); | 98 | printf(_("command: %s\n"), PS_COMMAND); |
99 | 99 | ||
100 | /* run the command to check for the Nagios process.. */ | 100 | /* run the command to check for the Nagios process.. */ |
101 | child_process = spopen (PS_COMMAND); | 101 | child_process = spopen (PS_COMMAND); |
@@ -206,8 +206,7 @@ process_arguments (int argc, char **argv) | |||
206 | expire_minutes = atoi (argv[2]); | 206 | expire_minutes = atoi (argv[2]); |
207 | else | 207 | else |
208 | die (STATE_UNKNOWN, | 208 | die (STATE_UNKNOWN, |
209 | _("Expiration time must be an integer (seconds)\nType '%s -h' for additional help\n"), | 209 | _("Expiration time must be an integer (seconds)\n")); |
210 | progname); | ||
211 | process_string = argv[3]; | 210 | process_string = argv[3]; |
212 | return OK; | 211 | return OK; |
213 | } | 212 | } |
@@ -220,9 +219,7 @@ process_arguments (int argc, char **argv) | |||
220 | 219 | ||
221 | switch (c) { | 220 | switch (c) { |
222 | case '?': /* print short usage statement if args not parsable */ | 221 | case '?': /* print short usage statement if args not parsable */ |
223 | printf (_("%s: Unknown argument: %c\n\n"), progname, optopt); | 222 | usage2 (_("Unknown argument"), optarg); |
224 | print_usage (); | ||
225 | exit (STATE_UNKNOWN); | ||
226 | case 'h': /* help */ | 223 | case 'h': /* help */ |
227 | print_help (); | 224 | print_help (); |
228 | exit (STATE_OK); | 225 | exit (STATE_OK); |
@@ -240,8 +237,7 @@ process_arguments (int argc, char **argv) | |||
240 | expire_minutes = atoi (optarg); | 237 | expire_minutes = atoi (optarg); |
241 | else | 238 | else |
242 | die (STATE_UNKNOWN, | 239 | die (STATE_UNKNOWN, |
243 | _("Expiration time must be an integer (seconds)\nType '%s -h' for additional help\n"), | 240 | _("Expiration time must be an integer (seconds)\n")); |
244 | progname); | ||
245 | break; | 241 | break; |
246 | case 'v': | 242 | case 'v': |
247 | verbose++; | 243 | verbose++; |
@@ -252,12 +248,10 @@ process_arguments (int argc, char **argv) | |||
252 | 248 | ||
253 | if (status_log == NULL) | 249 | if (status_log == NULL) |
254 | die (STATE_UNKNOWN, | 250 | die (STATE_UNKNOWN, |
255 | _("You must provide the status_log\nType '%s -h' for additional help\n"), | 251 | _("You must provide the status_log\n")); |
256 | progname); | ||
257 | else if (process_string == NULL) | 252 | else if (process_string == NULL) |
258 | die (STATE_UNKNOWN, | 253 | die (STATE_UNKNOWN, |
259 | _("You must provide a process string\nType '%s -h' for additional help\n"), | 254 | _("You must provide a process string\n")); |
260 | progname); | ||
261 | 255 | ||
262 | return OK; | 256 | return OK; |
263 | } | 257 | } |