summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/check_by_ssh.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins/check_by_ssh.c b/plugins/check_by_ssh.c
index 5aee534..59264dc 100644
--- a/plugins/check_by_ssh.c
+++ b/plugins/check_by_ssh.c
@@ -257,10 +257,10 @@ call_getopt (int argc, char **argv)
257 while (1) { 257 while (1) {
258#ifdef HAVE_GETOPT_H 258#ifdef HAVE_GETOPT_H
259 c = 259 c =
260 getopt_long (argc, argv, "+?Vvhft46:H:O:p:i:u:l:C:n:s:", long_options, 260 getopt_long (argc, argv, "+?Vvhft46H:O:p:i:u:l:C:n:s:", long_options,
261 &option_index); 261 &option_index);
262#else 262#else
263 c = getopt (argc, argv, "+?Vvhft46:H:O:p:i:u:l:C:n:s:"); 263 c = getopt (argc, argv, "+?Vvhft46H:O:p:i:u:l:C:n:s:");
264#endif 264#endif
265 265
266 if (c == -1 || c == EOF) 266 if (c == -1 || c == EOF)
@@ -293,9 +293,6 @@ call_getopt (int argc, char **argv)
293 case 'v': /* help */ 293 case 'v': /* help */
294 verbose = TRUE; 294 verbose = TRUE;
295 break; 295 break;
296 case 'f': /* fork to background */
297 comm = ssprintf (comm, "%s -f", comm);
298 break;
299 case 't': /* timeout period */ 296 case 't': /* timeout period */
300 if (!is_integer (optarg)) 297 if (!is_integer (optarg))
301 usage2 ("timeout interval must be an integer", optarg); 298 usage2 ("timeout interval must be an integer", optarg);
@@ -327,11 +324,10 @@ call_getopt (int argc, char **argv)
327 case 'i': /* identity */ 324 case 'i': /* identity */
328 comm = ssprintf (comm, "%s -%c %s", comm, c, optarg); 325 comm = ssprintf (comm, "%s -%c %s", comm, c, optarg);
329 break; 326 break;
330 case '4': /* IPv4 */ 327 case '4': /* Pass these switches directly to ssh */
331 comm = ssprintf (comm, "%s -4", comm); 328 case '6': /* -4 for IPv4, -6 for IPv6 */
332 break; 329 case 'f': /* fork to background */
333 case '6': /* IPv6 */ 330 comm = ssprintf (comm, "%s -%c", comm, c);
334 comm = ssprintf (comm, "%s -4", comm);
335 break; 331 break;
336 case 'C': /* Command for remote machine */ 332 case 'C': /* Command for remote machine */
337 commands++; 333 commands++;