[Nagiosplug-checkins] CVS: nagiosplug/plugins check_by_ssh.c,1.10,1.11

Karl DeBisschop kdebisschop at users.sourceforge.net
Wed Mar 19 15:45:03 CET 2003


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv27348

Modified Files:
	check_by_ssh.c 
Log Message:
allow to specify -1 and -2 for protocol version


Index: check_by_ssh.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_by_ssh.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** check_by_ssh.c	11 Mar 2003 22:22:08 -0000	1.10
--- check_by_ssh.c	19 Mar 2003 23:44:40 -0000	1.11
***************
*** 191,194 ****
--- 191,196 ----
  		{"logname", required_argument, 0, 'l'},
  		{"command", required_argument, 0, 'C'},
+ 		{"proto1", no_argument, 0, '1'},
+ 		{"proto2", no_argument, 0, '2'},
  		{"use-ipv4", no_argument, 0, '4'},
  		{"use-ipv6", no_argument, 0, '6'},
***************
*** 204,208 ****
  
  	while (1) {
! 		c = getopt_long (argc, argv, "Vvh46ft:H:O:p:i:u:l:C:n:s:", long_options,
  									 &option_index);
  
--- 206,210 ----
  
  	while (1) {
! 		c = getopt_long (argc, argv, "Vvh1246ft:H:O:p:i:u:l:C:n:s:", long_options,
  									 &option_index);
  
***************
*** 262,267 ****
  			asprintf (&comm, "%s -%c %s", comm, c, optarg);
  			break;
! 		case '4':									/* Pass these switches directly to ssh */
! 		case '6': 								/* -4 for IPv4, -6 for IPv6 */
  		case 'f':									/* fork to background */
  			asprintf (&comm, "%s -%c", comm, c);
--- 264,271 ----
  			asprintf (&comm, "%s -%c %s", comm, c, optarg);
  			break;
! 		case '1':									/* Pass these switches directly to ssh */
! 		case '2':									/* 1 to force version 1, 2 to force version 2 */
! 		case '4':									/* -4 for IPv4 */
! 		case '6': 								/* -6 for IPv6 */
  		case 'f':									/* fork to background */
  			asprintf (&comm, "%s -%c", comm, c);
***************
*** 358,361 ****
--- 362,369 ----
  		 "-n, --name=NAME\n"
  		 "   short name of host in nagios configuration [optional]\n"
+ 		 "-1, --proto1\n"
+ 		 "   tell ssh to use Protocol 1\n"
+ 		 "-2, --proto2\n"
+ 		 "   tell ssh to use Protocol 2\n"
  		 "-4, --use-ipv4\n"
  		 "   tell ssh to use IPv4\n"





More information about the Commits mailing list