summaryrefslogtreecommitdiffstats
path: root/web/attachments/350309-check_by_ssh_configfile.patch
blob: b609165fcb533875b21c3fba20ee56d9dc6b0cc5 (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
Index: plugins/check_by_ssh.c
===================================================================
189a190
> 		{"configfile", optional_argument, 0, 'F'},
201c202
< 		c = getopt_long (argc, argv, "Vvh1246fqt:H:O:p:i:u:l:C:S::E::n:s:o:", longopts,
---
> 		c = getopt_long (argc, argv, "Vvh1246fqt:H:O:p:i:u:l:C:S::E::n:s:o:F:", longopts,
308a310,313
> 		case 'F':									/* ssh configfile */
> 			comm_append("-F");
> 			comm_append(optarg);
> 			break;
422a428,429
>   printf (" %s\n","-F, --configfile");
>   printf ("    %s\n", _("Tell ssh to use this configfile[optional]"));
463c470
< 	        "       [-p port] [-o ssh-option]\n",
---
> 	        "       [-p port] [-o ssh-option] [-F configfile]\n",
Index: plugins/t/check_by_ssh.t
===================================================================
19a20,23
> my $ssh_conf = getTestParameter( "NP_SSH_CONFIGFILE",
>     "A config file with ssh settings",
>     "~/.ssh/config");
> 
22c26
< plan tests => 40;
---
> plan tests => 42;
87a92,97
> $result = NPTest->testCmd(
> 	"./check_by_ssh -i $ssh_key -H $ssh_service -F $ssh_conf -C 'exit 0'"
> 	);
> cmp_ok($result->return_code, '==', 0, "Exit with return code 0 (OK)");
> is($result->output, 'OK - check_by_ssh: Remote command \'exit 0\' returned status 0', "Status text if command returned none (OK)");
> 
146d155
<