aboutsummaryrefslogtreecommitdiffstats
path: root/net/netsaint-plugins
diff options
context:
space:
mode:
authorkuriyama <kuriyama@FreeBSD.org>2002-06-24 09:59:54 +0800
committerkuriyama <kuriyama@FreeBSD.org>2002-06-24 09:59:54 +0800
commit0f932952d40781a6ca256c5cdc2d5d744013ffdf (patch)
tree8333c4eb2caf898c468dea7b071d76af7ddcbdd1 /net/netsaint-plugins
parent6517de8aaa0529ef7d76a2ff12ce6903d472d9ea (diff)
downloadfreebsd-ports-gnome-0f932952d40781a6ca256c5cdc2d5d744013ffdf.tar.gz
freebsd-ports-gnome-0f932952d40781a6ca256c5cdc2d5d744013ffdf.tar.zst
freebsd-ports-gnome-0f932952d40781a6ca256c5cdc2d5d744013ffdf.zip
Bump PORTREVISION.
check_snmp calls snmpget without '-c' parameter, which is mandatory with NetSNMP 5.x. Add '-c' to the command line to make it work with both NetSNMP 4.x and 5.x. check_by_ssh dumps core with called without -C, also usage help output does not document -C and -v. check_ssh plugin incorrectly parses the SSH banner. check_ntp does not work with NTP v2. Add -n option to be able to select NTP version. Submitted by: David Douthitt <n9ubh@callsign.net>, Jens Trzaska <jt@barfoos.de> (check_snmp) via maintainer
Diffstat (limited to 'net/netsaint-plugins')
-rw-r--r--net/netsaint-plugins/Makefile1
-rw-r--r--net/netsaint-plugins/files/patch-check_by_ssh.c29
-rw-r--r--net/netsaint-plugins/files/patch-check_ntp.pl76
-rw-r--r--net/netsaint-plugins/files/patch-check_snmp.c20
-rw-r--r--net/netsaint-plugins/files/patch-check_ssh.c20
-rw-r--r--net/netsaint-plugins/files/patch-subst.in11
6 files changed, 157 insertions, 0 deletions
diff --git a/net/netsaint-plugins/Makefile b/net/netsaint-plugins/Makefile
index b6570cec94ac..4ddc787b7468 100644
--- a/net/netsaint-plugins/Makefile
+++ b/net/netsaint-plugins/Makefile
@@ -7,6 +7,7 @@
PORTNAME= netsaint-plugins
PORTVERSION= 1.2.9.4
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= netsaintplug
diff --git a/net/netsaint-plugins/files/patch-check_by_ssh.c b/net/netsaint-plugins/files/patch-check_by_ssh.c
new file mode 100644
index 000000000000..f89ad7d49ffa
--- /dev/null
+++ b/net/netsaint-plugins/files/patch-check_by_ssh.c
@@ -0,0 +1,29 @@
+--- plugins/check_by_ssh.c.orig Fri Jun 21 11:19:56 2002
++++ plugins/check_by_ssh.c Fri Jun 21 11:54:25 2002
+@@ -191,7 +191,7 @@
+ if (commands>1)
+ remotecmd=strscat(remotecmd,";echo STATUS CODE: $?;");
+
+- if (strlen (remotecmd) <= 1)
++ if (remotecmd==NULL)
+ usage ("No remotecmd\n");
+
+ comm = ssprintf(comm,"%s %s '%s'",comm,hostname,remotecmd);
+@@ -369,6 +369,8 @@
+ " list of netsaint service names, separated by ':' [optional]\n"
+ "-n, --name=NAME\n"
+ " short name of host in netsaint configuration [optional]\n"
++ "-v, --verbose\n"
++ " short name of host in netsaint configuration [optional]\n"
+ "\n"
+ "The most common mode of use is to refer to a local identity file with\n"
+ "the '-i' option. In this mode, the identity pair should have a null\n"
+@@ -388,7 +390,7 @@
+
+
+ #define OPTIONS "\
+--H <host> [-P port] [-f] [-y] [-t timeout] [-i identity]\n
++-H <host> -C <command> [-fyv] [-P port] [-t timeout] [-i identity]\n
+ [-l user] [-n name] [-s servicelist] [-O outputfile]"
+
+ void print_usage(void)
diff --git a/net/netsaint-plugins/files/patch-check_ntp.pl b/net/netsaint-plugins/files/patch-check_ntp.pl
new file mode 100644
index 000000000000..3a3e3959ab88
--- /dev/null
+++ b/net/netsaint-plugins/files/patch-check_ntp.pl
@@ -0,0 +1,76 @@
+--- plugins-scripts/check_ntp.pl.orig Sun Jun 23 14:28:03 2002
++++ plugins-scripts/check_ntp.pl Sun Jun 23 14:28:27 2002
+@@ -44,6 +44,10 @@
+ # o Server has correct time but isn't suitable synchronization
+ # source. This happens while starting up and if contact
+ # with master has been lost.
++#
++# (c) 2001 David Douthitt <n9ubh@callsign.net>
++#
++# Script modified to handle NTP v2 with new -n parameter
+
+ BEGIN {
+ if ($0 =~ m/^(.*?)[\/\\]([^\/\\]+)$/) {
+@@ -56,7 +60,7 @@
+ use POSIX;
+ use strict;
+ use Getopt::Long;
+-use vars qw($opt_H $opt_w $opt_c $verbose $PROGNAME);
++use vars qw($opt_n $opt_H $opt_w $opt_c $verbose $PROGNAME);
+ use lib $main::runtimedir;
+ use utils qw($TIMEOUT %ERRORS &print_revision &usage &support &is_error);
+
+@@ -69,6 +73,7 @@
+ sub version ();
+
+ delete @ENV{'PATH', 'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
++$ENV{'PATH'} = "/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin";
+
+ Getopt::Long::Configure('bundling', 'no_ignore_case');
+ GetOptions
+@@ -77,6 +82,7 @@
+ "v|verbose" => \$verbose,
+ "w|warning=s" => \$opt_w,
+ "c|critical=s" => \$opt_c,
++ "n|ntpversion" => \$opt_n,
+ "H|hostname=s" => \$opt_H);
+
+ ($opt_H) || ($opt_H = shift) || usage("Host name/address not specified\n");
+@@ -93,6 +99,9 @@
+ ($opt_c) || ($opt_c = shift) || ($opt_c = 120);
+ my $critical = $1 if ($opt_c =~ /([0-9]+)/);
+
++($opt_n) || ($opt_n = shift) || ($opt_n = 3);
++my $ntp_version = $1 if ($opt_n =~ /([0-9])/);
++
+ my $answer = undef;
+ my $offset = undef;
+ my $msg; # first line of output to print if format is invalid
+@@ -117,7 +126,7 @@
+ ###
+ ###
+
+-if (!open (NTPDATE, "/usr/local/sbin/ntpdate -q $host 2>&1 |")) {
++if (!open (NTPDATE, "ntpdate -o$ntp_version -q $host 2>&1 |")) {
+ print "Could not open ntpdate\n";
+ exit $ERRORS{"UNKNOWN"};
+ }
+@@ -154,8 +163,7 @@
+ ###
+ ###
+
+-if (open(NTPDC,"/usr/sbin/xntpdc -c peers $host 2>&1 |") ||
+- open(NTPDC,"/usr/sbin/ntpdc -c peers $host 2>&1 |")) {
++if (open(NTPDC,"/usr/sbin/ntpdc -c peers $host 2>&1 |")) {
+ while (<NTPDC>) {
+ print if ($verbose);
+ if (/([^\s]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)/) {
+@@ -224,7 +232,7 @@
+ exit $state;
+
+ sub print_usage () {
+- print "Usage: $PROGNAME -H <host> [-w <warn>] [-c <crit>]\n";
++ print "Usage: $PROGNAME -H <host> [ -n <ntp_version> ] [-w <warn>] [-c <crit>]\n";
+ }
+
+ sub print_help () {
diff --git a/net/netsaint-plugins/files/patch-check_snmp.c b/net/netsaint-plugins/files/patch-check_snmp.c
new file mode 100644
index 000000000000..9f7a6dbd5e75
--- /dev/null
+++ b/net/netsaint-plugins/files/patch-check_snmp.c
@@ -0,0 +1,20 @@
+--- plugins/check_snmp.c.orig Fri Jun 21 14:34:23 2002
++++ plugins/check_snmp.c Fri Jun 21 14:33:45 2002
+@@ -146,13 +146,13 @@
+ /* create the command line to execute */
+ if (getnext==TRUE) {
+ command_line = ssprintf (command_line,
+- "%s -m ALL -v 1 %s %s %s",
+- PATH_TO_SNMPGETNEXT, server_address, community, oid);
++ "%s -m ALL -v 1 -c %s %s %s",
++ PATH_TO_SNMPGETNEXT, community, server_address, oid);
+ }
+ else {
+ command_line = ssprintf (command_line,
+- "%s -m ALL -v 1 %s %s %s",
+- PATH_TO_SNMPGET, server_address, community, oid);
++ "%s -m ALL -v 1 -c %s %s %s",
++ PATH_TO_SNMPGET, community, server_address, oid);
+ }
+
+ /* run the command */
diff --git a/net/netsaint-plugins/files/patch-check_ssh.c b/net/netsaint-plugins/files/patch-check_ssh.c
new file mode 100644
index 000000000000..d80b91a2abb9
--- /dev/null
+++ b/net/netsaint-plugins/files/patch-check_ssh.c
@@ -0,0 +1,20 @@
+--- plugins/check_ssh.c.orig Fri Jun 21 12:17:43 2002
++++ plugins/check_ssh.c Fri Jun 21 12:23:16 2002
+@@ -246,7 +246,7 @@
+ printf("%s\n", output);
+ ssh_proto = output + 4;
+ ssh_server = ssh_proto + strspn(ssh_proto, "0123456789-. ");
+- ssh_proto[strspn(ssh_proto, "0123456789-. ")] = 0;
++ ssh_proto[strspn(ssh_proto, "0123456789. ")] = 0;
+ printf
+ ("SSH ok - protocol version %s - server version %s\n",
+ ssh_proto, ssh_server);
+@@ -272,7 +272,7 @@
+ {
+ printf
+ ("Usage:\n"
+- " %s -t [timeout] -p [port] <host>\n"
++ " %s [-t <timeout>] [-p <port>] <host>\n"
+ " %s -V prints version info\n"
+ " %s -h prints more detailed help\n", PROGNAME, PROGNAME, PROGNAME);
+ }
diff --git a/net/netsaint-plugins/files/patch-subst.in b/net/netsaint-plugins/files/patch-subst.in
new file mode 100644
index 000000000000..3caf2cb87757
--- /dev/null
+++ b/net/netsaint-plugins/files/patch-subst.in
@@ -0,0 +1,11 @@
+--- plugins-scripts/subst.in.orig Fri Sep 1 05:47:35 2000
++++ plugins-scripts/subst.in Sun Jun 23 14:24:00 2002
+@@ -33,7 +33,7 @@
+ # Trusted path mechanism (deprecated)
+
+ /^[ \t]*\$ENV[ \t]*\{[ \t'"]*PATH[ \t"']*\}[ \t]*=/ {
+- sub(/\=[ \t]*['"][^"']+["']/,"='@trusted_path@' # autoconf-derived");
++ sub(/\=[ \t]*['"][^"']+["'];/,"='@trusted_path@'; # autoconf-derived");
+ }
+
+ /^[\t ]*(export[\t ]*)?PATH[\t ]*=['"]+.+["']$/ {