--- check_by_ssh.c.orig 2005-02-08 18:17:08.000000000 +0300 +++ check_by_ssh.c 2005-02-08 18:13:37.000000000 +0300 @@ -191,6 +191,7 @@ {"user", required_argument, 0, 'u'}, {"logname", required_argument, 0, 'l'}, {"command", required_argument, 0, 'C'}, + {"quiet", required_argument, 0, 'q'}, {"use-ipv4", no_argument, 0, '4'}, {"use-ipv6", no_argument, 0, '6'}, {0, 0, 0, 0} @@ -207,10 +208,10 @@ while (1) { #ifdef HAVE_GETOPT_H c = - getopt_long (argc, argv, "Vvh46ft:H:O:p:i:u:l:C:n:s:", long_options, + getopt_long (argc, argv, "Vvhq46ft:H:O:p:i:u:l:C:n:s:", long_options, &option_index); #else - c = getopt (argc, argv, "Vvh46ft:H:O:p:i:u:l:C:n:s:"); + c = getopt (argc, argv, "Vvhq46ft:H:O:p:i:u:l:C:n:s:"); #endif if (c == -1 || c == EOF) @@ -268,6 +269,7 @@ case 'i': /* identity */ asprintf (&comm, "%s -%c %s", comm, c, optarg); break; + case 'q': /* quiet */ case '4': /* Pass these switches directly to ssh */ case '6': /* -4 for IPv4, -6 for IPv6 */ case 'f': /* fork to background */ @@ -364,6 +366,8 @@ " list of nagios service names, separated by ':' [optional]\n" "-n, --name=NAME\n" " short name of host in nagios configuration [optional]\n" + "-q, --quiet\n" + " tell ssh to run in quiet mode\n" "-4, --use-ipv4\n" " tell ssh to use IPv4\n" "-6, --use-ipv6\n" @@ -391,7 +395,7 @@ { printf ("Usage:\n" - "check_by_ssh [-f46] [-t timeout] [-i identity] [-l user] -H -C \n" + "check_by_ssh [-fq46] [-t timeout] [-i identity] [-l user] -H -C \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");