[Nagiosplug-checkins] CVS: nagiosplug/plugins check_by_ssh.c,1.1.1.1,1.2
Subhendu Ghosh
sghosh at users.sourceforge.net
Wed Aug 14 12:05:14 CEST 2002
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory usw-pr-cvs1:/tmp/cvs-serv2047
Modified Files:
check_by_ssh.c
Log Message:
ipv4/ipv6 switch added
Index: check_by_ssh.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_by_ssh.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** check_by_ssh.c 28 Feb 2002 06:42:57 -0000 1.1.1.1
--- check_by_ssh.c 14 Aug 2002 19:04:29 -0000 1.2
***************
*** 241,245 ****
{"timeout", required_argument, 0, 't'},
{"host", required_argument, 0, 'H'},
! {"port", required_argument,0,'P'},
{"output", required_argument, 0, 'O'},
{"name", required_argument, 0, 'n'},
--- 241,245 ----
{"timeout", required_argument, 0, 't'},
{"host", required_argument, 0, 'H'},
! {"port", required_argument,0,'p'},
{"output", required_argument, 0, 'O'},
{"name", required_argument, 0, 'n'},
***************
*** 249,252 ****
--- 249,254 ----
{"logname", required_argument, 0, 'l'},
{"command", required_argument, 0, 'C'},
+ {"use-ipv4", no_argument, 0, '4'},
+ {"use-ipv6", no_argument, 0, '6'},
{0, 0, 0, 0}
};
***************
*** 256,263 ****
#ifdef HAVE_GETOPT_H
c =
! getopt_long (argc, argv, "+?Vvhft:H:O:P:p:i:u:l:C:n:s:", long_options,
&option_index);
#else
! c = getopt (argc, argv, "+?Vvhft:H:O:P:p:i:u:l:C:n:s:");
#endif
--- 258,265 ----
#ifdef HAVE_GETOPT_H
c =
! getopt_long (argc, argv, "+?Vvhft46:H:O:p:i:u:l:C:n:s:", long_options,
&option_index);
#else
! c = getopt (argc, argv, "+?Vvhft46:H:O:p:i:u:l:C:n:s:");
#endif
***************
*** 305,309 ****
hostname = optarg;
break;
- case 'P': /* port number */
case 'p': /* port number */
if (!is_integer (optarg))
--- 307,310 ----
***************
*** 327,330 ****
--- 328,337 ----
comm = ssprintf (comm, "%s -%c %s", comm, c, optarg);
break;
+ case '4': /* IPv4 */
+ comm = ssprintf (comm, "%s -4", comm);
+ break;
+ case '6': /* IPv6 */
+ comm = ssprintf (comm, "%s -4", comm);
+ break;
case 'C': /* Command for remote machine */
commands++;
***************
*** 373,377 ****
"-t, --timeout=INTEGER\n"
" specify timeout (default: %d seconds) [optional]\n"
! "-l, --logname=USERNAME\n"
" SSH user name on remote host [optional]\n"
"-i, --identity=KEYFILE\n"
--- 380,386 ----
"-t, --timeout=INTEGER\n"
" specify timeout (default: %d seconds) [optional]\n"
! "-p, --port=PORT\n"
! " port to connect to on remote system [optional]\n"
! "-l, --logname=USERNAME\n"
" SSH user name on remote host [optional]\n"
"-i, --identity=KEYFILE\n"
***************
*** 383,386 ****
--- 392,399 ----
"-n, --name=NAME\n"
" short name of host in nagios configuration [optional]\n"
+ "-4, --use-ipv4\n"
+ " tell ssh to use IPv4\n"
+ "-6, --use-ipv6\n"
+ " tell ssh to use IPv6\n"
"\n"
"The most common mode of use is to refer to a local identity file with\n"
***************
*** 406,411 ****
printf
("Usage:\n"
! "check_by_ssh [-f] [-t timeout] [-i identity] [-l user] -H <host> <command>\n"
! " [-n name] [-s servicelist] [-O outputfile] [-P port]\n"
"check_by_ssh -V prints version info\n"
"check_by_ssh -h prints more detailed help\n");
--- 419,424 ----
printf
("Usage:\n"
! "check_by_ssh [-f46] [-t timeout] [-i identity] [-l user] -H <host> -C <command>\n"
! " [-n name] [-s servicelist] [-O outputfile] [-p port]\n"
"check_by_ssh -V prints version info\n"
"check_by_ssh -h prints more detailed help\n");
More information about the Commits
mailing list