From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- .../350309-check_by_ssh_configfile.patch | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 web/attachments/350309-check_by_ssh_configfile.patch (limited to 'web/attachments/350309-check_by_ssh_configfile.patch') 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 @@ +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 +< -- cgit v1.2.3-74-g34f1