diff options
| author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2002-08-18 18:03:10 +0000 |
|---|---|---|
| committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2002-08-18 18:03:10 +0000 |
| commit | 318bb4ae140f0676f1988815d99dcf707a51337c (patch) | |
| tree | c5a8cd3ce03b1256db47f0481e83a612cdebf042 | |
| parent | 9be0af942ae5d23cebbb92a93b49d8c05f4ff429 (diff) | |
| download | monitoring-plugins-318bb4ae140f0676f1988815d99dcf707a51337c.tar.gz | |
typo in options passed to ssh for ipv6.
fix by setting a generic hook for 1-char pasthhru options
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@81 f882894a-f735-0410-b71e-b25c423dba1c
| -rw-r--r-- | plugins/check_by_ssh.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins/check_by_ssh.c b/plugins/check_by_ssh.c index 5aee5343..59264dcd 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++; |
