diff options
Diffstat (limited to 'plugins/check_by_ssh.c')
-rw-r--r-- | plugins/check_by_ssh.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins/check_by_ssh.c b/plugins/check_by_ssh.c index a877f888..13d8bc3b 100644 --- a/plugins/check_by_ssh.c +++ b/plugins/check_by_ssh.c | |||
@@ -100,6 +100,13 @@ main (int argc, char **argv) | |||
100 | 100 | ||
101 | result = cmd_run_array (commargv, &chld_out, &chld_err, 0); | 101 | result = cmd_run_array (commargv, &chld_out, &chld_err, 0); |
102 | 102 | ||
103 | if (verbose) { | ||
104 | for(i = 0; i < chld_out.lines; i++) | ||
105 | printf("stdout: %s\n", chld_out.line[i]); | ||
106 | for(i = 0; i < chld_err.lines; i++) | ||
107 | printf("stderr: %s\n", chld_err.line[i]); | ||
108 | } | ||
109 | |||
103 | if (skip_stdout == -1) /* --skip-stdout specified without argument */ | 110 | if (skip_stdout == -1) /* --skip-stdout specified without argument */ |
104 | skip_stdout = chld_out.lines; | 111 | skip_stdout = chld_out.lines; |
105 | if (skip_stderr == -1) /* --skip-stderr specified without argument */ | 112 | if (skip_stderr == -1) /* --skip-stderr specified without argument */ |
@@ -209,10 +216,10 @@ process_arguments (int argc, char **argv) | |||
209 | switch (c) { | 216 | switch (c) { |
210 | case 'V': /* version */ | 217 | case 'V': /* version */ |
211 | print_revision (progname, NP_VERSION); | 218 | print_revision (progname, NP_VERSION); |
212 | exit (STATE_OK); | 219 | exit (STATE_UNKNOWN); |
213 | case 'h': /* help */ | 220 | case 'h': /* help */ |
214 | print_help (); | 221 | print_help (); |
215 | exit (STATE_OK); | 222 | exit (STATE_UNKNOWN); |
216 | case 'v': /* help */ | 223 | case 'v': /* help */ |
217 | verbose = TRUE; | 224 | verbose = TRUE; |
218 | break; | 225 | break; |