Update to 2.1.1

Sponsored by:	Absolight
This commit is contained in:
Mathieu Arnold 2015-09-03 08:50:29 +00:00
parent 9e1fa332c6
commit dffee50e80
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=395932
10 changed files with 32 additions and 59 deletions

View file

@ -2,8 +2,8 @@
# $FreeBSD$
PORTNAME= nagios-plugins
PORTVERSION= 2.0.3
PORTREVISION= 9
PORTVERSION= 2.1.1
PORTREVISION= 0
PORTEPOCH= 1
CATEGORIES= net-mgmt
MASTER_SITES= https://www.nagios-plugins.org/download/ \
@ -161,6 +161,8 @@ post-patch:
.endfor
@${REINPLACE_CMD} -e 's|chown root|${TRUE}|g' ${WRKSRC}/plugins-root/Makefile.in
# add a fake PATH so that it gets set to a correct value during build.
@${REINPLACE_CMD} -e "s|$$ENV{'PATH'}=''|$$ENV{'PATH'}='foo'|" ${WRKSRC}/plugins-scripts/*.pl
@${REINPLACE_CMD} -e "s|$$ENV{'PATH'}=''|$$ENV{'PATH'}='foo'|; \
s|/usr/bin/|${LOCALBASE}/bin/|g" \
${WRKSRC}/plugins-scripts/*.pl
.include <bsd.port.mk>

View file

@ -1,2 +1,2 @@
SHA256 (nagios-plugins-2.0.3.tar.gz) = 8f0021442dce0138f0285ca22960b870662e28ae8973d49d439463588aada04a
SIZE (nagios-plugins-2.0.3.tar.gz) = 2659772
SHA256 (nagios-plugins-2.1.1.tar.gz) = c7daf95ecbf6909724258e55a319057b78dcca23b2a6cc0a640b90c90d4feae3
SIZE (nagios-plugins-2.1.1.tar.gz) = 2677352

View file

@ -1,11 +1,11 @@
--- plugins/check_dig.c.orig 2014-03-04 21:41:57 UTC
--- plugins/check_dig.c.orig 2015-07-30 21:40:06 UTC
+++ plugins/check_dig.c
@@ -94,8 +94,8 @@ main (int argc, char **argv)
timeout_interval_dig = ceil((double) timeout_interval / (double) number_tries);
/* get the command to run */
- xasprintf (&command_line, "%s @%s -p %d %s -t %s %s %s +tries=%d +time=%d",
- PATH_TO_DIG, dns_server, server_port, query_address, record_type, dig_args, query_transport, number_tries, timeout_interval_dig);
- xasprintf (&command_line, "%s %s %s -p %d @%s %s %s +tries=%d +time=%d",
- PATH_TO_DIG, dig_args, query_transport, server_port, dns_server, query_address, record_type, number_tries, timeout_interval_dig);
+ xasprintf (&command_line, "%s %s @%s -z -p %d %s %s %s",
+ PATH_TO_DIG, dig_args, dns_server, server_port, query_transport, query_address, record_type);

View file

@ -1,6 +1,6 @@
--- configure.orig 2014-06-26 16:17:37 UTC
--- configure.orig 2015-07-31 17:47:20 UTC
+++ configure
@@ -21787,7 +21787,7 @@ then
@@ -22224,7 +22224,7 @@ then
$as_echo "$ac_cv_ps_command" >&6; }
elif ps -axwo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \

View file

@ -1,4 +1,4 @@
--- plugins-root/check_dhcp.c.orig 2014-06-26 16:17:12 UTC
--- plugins-root/check_dhcp.c.orig 2015-07-30 21:40:06 UTC
+++ plugins-root/check_dhcp.c
@@ -326,7 +326,8 @@ int get_hardware_address(int sock,char *
#elif defined(__bsd__)
@ -10,7 +10,7 @@
char *buf;
unsigned char *ptr;
struct if_msghdr *ifm;
@@ -1185,7 +1186,7 @@ int call_getopt(int argc, char **argv){
@@ -1194,7 +1195,7 @@ int call_getopt(int argc, char **argv){
}
}

View file

@ -1,14 +1,14 @@
--- plugins-scripts/check_ircd.pl.orig 2014-03-04 21:41:57 UTC
--- plugins-scripts/check_ircd.pl.orig 2015-07-30 21:40:06 UTC
+++ plugins-scripts/check_ircd.pl
@@ -66,6 +66,7 @@
$ENV{PATH} = "";
$ENV{ENV} = "";
$ENV{BASH_ENV} = "";
+$ENV{CDPATH} = "";
@@ -67,6 +67,7 @@ sub bindRemote ($$);
$ENV{'PATH'}='@TRUSTED_PATH@';
$ENV{'BASH_ENV'}='';
$ENV{'ENV'}='';
+$ENV{'CDPATH'} = "";
# -----------------------------------------------------------------[ Global ]--
@@ -153,7 +154,7 @@
@@ -154,7 +155,7 @@ sub bindRemote ($$)
print "IRCD UNKNOWN: Could not start socket ($!)\n";
exit $ERRORS{"UNKNOWN"};
}

View file

@ -1,6 +1,6 @@
--- plugins-scripts/check_ntp.pl.orig 2014-03-04 21:41:57 UTC
--- plugins-scripts/check_ntp.pl.orig 2015-07-30 21:40:06 UTC
+++ plugins-scripts/check_ntp.pl
@@ -313,7 +313,6 @@
@@ -313,7 +313,6 @@ if ($have_ntpq) {
}
} else {
print "No match!\n" if $verbose;
@ -8,7 +8,7 @@
}
}
@@ -427,7 +426,7 @@
@@ -427,7 +426,7 @@ if ($ntpdate_error != $ERRORS{'OK'}) {
foreach my $key (keys %ERRORS) {
if ($state==$ERRORS{$key}) {
# print ("NTP $key: $answer");

View file

@ -1,29 +0,0 @@
--- plugins-scripts/subst.in.orig 2014-03-04 21:41:57 UTC
+++ plugins-scripts/subst.in
@@ -1,7 +1,7 @@
#!/usr/bin/awk
function which(c,path) {
- cmd = "test -x " c;
+ cmd = "[ " c " = @libexecdir@ ] || test -x " c;
if (system(cmd)==0) {
return c;
@@ -53,7 +53,7 @@
# FIXME: Prepend executables with a substitution keyword instead.
#
/^[^#]/ && /(\/.*)?\/(bin|sbin|lib|libexec)\// {
- match($0,/(\/.*)?\/(bin|sbin|lib|libexec)\/[-_a-zA-Z0-9]+/);
+ match($0,/(\/[^ ]*)?\/(bin|sbin|lib|libexec)\/[-_a-zA-Z0-9]+/);
c=substr($0,RSTART,RLENGTH);
sub(c,which(c,path));
}
@@ -65,7 +65,7 @@
# Trusted path mechanism (deprecated)
/^[ \t]*\$ENV[ \t]*\{[ \t'"]*PATH[ \t"']*\}[ \t]*=/ {
- sub(/\=[ \t]*['"][^"']+["']/,"='@with_trusted_path@' # autoconf-derived");
+ sub(/\=[ \t]*['"][^"']+["'];/,"='@with_trusted_path@'; # autoconf-derived");
}
/^[\t ]*(export[\t ]*)?PATH[\t ]*=['"]+.+["']$/ {

View file

@ -1,6 +1,6 @@
--- plugins/check_pgsql.c.orig 2014-04-15 22:19:03 UTC
--- plugins/check_pgsql.c.orig 2015-07-30 21:40:06 UTC
+++ plugins/check_pgsql.c
@@ -36,6 +36,7 @@
@@ -36,6 +36,7 @@ const char *email = "devel@nagios-plugin
#include "utils.h"
#include "netutils.h"

View file

@ -1,17 +1,17 @@
--- plugins/check_ssh.c.orig 2014-03-04 21:41:57 UTC
--- plugins/check_ssh.c.orig 2015-07-30 21:40:06 UTC
+++ plugins/check_ssh.c
@@ -255,6 +255,7 @@
@@ -252,6 +252,7 @@ ssh_connect (char *haddr, int hport, cha
printf
(_("SSH WARNING - %s (protocol %s) version mismatch, expected '%s'\n"),
(_("SSH CRITICAL - %s (protocol %s) version mismatch, expected '%s'\n"),
ssh_server, ssh_proto, remote_version);
+ recv (sd, output, BUFF_SZ, 0);
close(sd);
exit (STATE_WARNING);
exit (STATE_CRITICAL);
}
@@ -273,6 +274,7 @@
@@ -270,6 +271,7 @@ ssh_connect (char *haddr, int hport, cha
(_("SSH OK - %s (protocol %s) | %s\n"),
ssh_server, ssh_proto, fperfdata("time", elapsed_time, "s",
FALSE, 0, FALSE, 0, TRUE, 0, TRUE, (int)socket_timeout));
FALSE, 0, FALSE, 0, TRUE, 0, TRUE, (int)timeout_interval));
+ recv (sd, output, BUFF_SZ, 0);
close(sd);
exit (STATE_OK);