diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_dummy.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/plugins/check_dummy.c b/plugins/check_dummy.c index 9ca7a3ab..a8eae1a8 100644 --- a/plugins/check_dummy.c +++ b/plugins/check_dummy.c | |||
@@ -38,7 +38,7 @@ main (int argc, char **argv) | |||
38 | bindtextdomain (PACKAGE, LOCALEDIR); | 38 | bindtextdomain (PACKAGE, LOCALEDIR); |
39 | textdomain (PACKAGE); | 39 | textdomain (PACKAGE); |
40 | 40 | ||
41 | if (argc != 2) | 41 | if (argc < 2) |
42 | usage (_("Incorrect number of arguments supplied\n")); | 42 | usage (_("Incorrect number of arguments supplied\n")); |
43 | else if (strcmp (argv[1], "-V") == 0 || strcmp (argv[1], "--version") == 0) { | 43 | else if (strcmp (argv[1], "-V") == 0 || strcmp (argv[1], "--version") == 0) { |
44 | print_revision (progname, revision); | 44 | print_revision (progname, revision); |
@@ -55,22 +55,27 @@ main (int argc, char **argv) | |||
55 | 55 | ||
56 | switch (result) { | 56 | switch (result) { |
57 | case STATE_OK: | 57 | case STATE_OK: |
58 | printf ("Status is OK\n"); | 58 | printf (_("OK")); |
59 | break; | 59 | break; |
60 | case STATE_WARNING: | 60 | case STATE_WARNING: |
61 | printf ("Status is at WARNING level\n"); | 61 | printf (_("WARNING")); |
62 | break; | 62 | break; |
63 | case STATE_CRITICAL: | 63 | case STATE_CRITICAL: |
64 | printf ("Status is CRITICAL\n"); | 64 | printf (_("CRITICAL")); |
65 | break; | 65 | break; |
66 | case STATE_UNKNOWN: | 66 | case STATE_UNKNOWN: |
67 | printf ("Status is UNKNOWN\n"); | 67 | printf (_("UNKNOWN")); |
68 | break; | 68 | break; |
69 | default: | 69 | default: |
70 | printf ("Status %d is not a supported error state\n", result); | 70 | printf (_("Status %d is not a supported error state\n"), result); |
71 | break; | 71 | break; |
72 | } | 72 | } |
73 | 73 | ||
74 | if (argc >= 3) | ||
75 | printf (": %s", argv[2]); | ||
76 | |||
77 | printf("\n"); | ||
78 | |||
74 | return result; | 79 | return result; |
75 | } | 80 | } |
76 | 81 | ||
@@ -90,7 +95,7 @@ print_help (void) | |||
90 | 95 | ||
91 | printf (_("\n\ | 96 | printf (_("\n\ |
92 | This plugin will simply return the state corresponding to the numeric value\n\ | 97 | This plugin will simply return the state corresponding to the numeric value\n\ |
93 | of the <state> argument.\n")); | 98 | of the <state> argument with optional text.\n")); |
94 | 99 | ||
95 | printf (_(UT_SUPPORT)); | 100 | printf (_(UT_SUPPORT)); |
96 | } | 101 | } |
@@ -100,5 +105,5 @@ of the <state> argument.\n")); | |||
100 | void | 105 | void |
101 | print_usage (void) | 106 | print_usage (void) |
102 | { | 107 | { |
103 | printf (_("Usage: %s <integer state>\n"), progname); | 108 | printf (_("Usage: %s <integer state> [optional text]\n"), progname); |
104 | } | 109 | } |