summaryrefslogtreecommitdiffstats
path: root/web/attachments/350309-check_by_ssh_configfile.patch
diff options
context:
space:
mode:
Diffstat (limited to 'web/attachments/350309-check_by_ssh_configfile.patch')
-rw-r--r--web/attachments/350309-check_by_ssh_configfile.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/web/attachments/350309-check_by_ssh_configfile.patch b/web/attachments/350309-check_by_ssh_configfile.patch
new file mode 100644
index 0000000..b609165
--- /dev/null
+++ b/web/attachments/350309-check_by_ssh_configfile.patch
@@ -0,0 +1,40 @@
1Index: plugins/check_by_ssh.c
2===================================================================
3189a190
4> {"configfile", optional_argument, 0, 'F'},
5201c202
6< c = getopt_long (argc, argv, "Vvh1246fqt:H:O:p:i:u:l:C:S::E::n:s:o:", longopts,
7---
8> c = getopt_long (argc, argv, "Vvh1246fqt:H:O:p:i:u:l:C:S::E::n:s:o:F:", longopts,
9308a310,313
10> case 'F': /* ssh configfile */
11> comm_append("-F");
12> comm_append(optarg);
13> break;
14422a428,429
15> printf (" %s\n","-F, --configfile");
16> printf (" %s\n", _("Tell ssh to use this configfile[optional]"));
17463c470
18< " [-p port] [-o ssh-option]\n",
19---
20> " [-p port] [-o ssh-option] [-F configfile]\n",
21Index: plugins/t/check_by_ssh.t
22===================================================================
2319a20,23
24> my $ssh_conf = getTestParameter( "NP_SSH_CONFIGFILE",
25> "A config file with ssh settings",
26> "~/.ssh/config");
27>
2822c26
29< plan tests => 40;
30---
31> plan tests => 42;
3287a92,97
33> $result = NPTest->testCmd(
34> "./check_by_ssh -i $ssh_key -H $ssh_service -F $ssh_conf -C 'exit 0'"
35> );
36> cmp_ok($result->return_code, '==', 0, "Exit with return code 0 (OK)");
37> is($result->output, 'OK - check_by_ssh: Remote command \'exit 0\' returned status 0', "Status text if command returned none (OK)");
38>
39146d155
40<