summaryrefslogtreecommitdiffstats
path: root/web/attachments/119447-check_by_ssh.diff
blob: a915d9f14943b4723877d638684cc264afe7e277 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
--- 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 <host> -C <command>\n"
+		 "check_by_ssh [-fq46] [-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");