1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-29 01:13:08 +00:00

net-mgmt/pnp:

- Add patches for templates.dist to work with newer versions of rrdtool
- Switch from WANT_PHP_WEB to USES= php and php:web
- Bump PORTREVISION
This commit is contained in:
Lars Engels 2017-03-21 13:49:10 +00:00
parent c628ebafdc
commit a929e203c9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=436605
7 changed files with 70 additions and 5 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= pnp
PORTVERSION= 0.6.25
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= net-mgmt
MASTER_SITES= SF/pnp4nagios/PNP-0.6
DISTNAME= pnp4nagios-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX}
@ -18,7 +18,7 @@ RUN_DEPENDS?= ${LOCALBASE}/bin/rrdtool:databases/rrdtool \
nagios:net-mgmt/nagios
MAKE_JOBS_UNSAFE= yes
USES= perl5 dos2unix
USES= dos2unix perl5 php php:web
OPTIONS_DEFINE= PDF
OPTIONS_DEFAULT= PDF
@ -27,7 +27,6 @@ PDF_DESC= Use built-in fpdf library to produce PDF views
.include <bsd.port.options.mk>
USE_PHP= gd iconv json pcre session simplexml sockets xml zlib
WANT_PHP_WEB= yes
USE_RC_SUBR= npcd

View File

@ -1,5 +1,5 @@
--- sample-config/Makefile.in.orig 2015-01-03 14:09:06.000000000 +0100
+++ sample-config/Makefile.in 2015-04-22 21:47:23.294933000 +0200
--- sample-config/Makefile.in.orig 2015-01-03 13:09:06 UTC
+++ sample-config/Makefile.in
@@ -40,35 +40,18 @@ install:
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(SYSCONFDIR)/check_commands
$(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(SYSCONFDIR)/pages

View File

@ -0,0 +1,11 @@
--- share/pnp/templates.dist/check_dns.php.orig 2017-03-21 13:39:01 UTC
+++ share/pnp/templates.dist/check_dns.php
@@ -4,7 +4,7 @@
# Template for check_dns
#
-$opt[1] = "--lower=$MIN[1] --vertical-label $UNIT[1] --title \"DNS Response Time\" ";
+$opt[1] = "--lower-limit=$MIN[1] --vertical-label $UNIT[1] --title \"DNS Response Time\" ";
$def[1] = "DEF:var1=$RRDFILE[1]:$DS[1]:AVERAGE " ;

View File

@ -0,0 +1,11 @@
--- share/pnp/templates.dist/check_multi.php.orig 2017-03-21 13:39:07 UTC
+++ share/pnp/templates.dist/check_multi.php
@@ -4,7 +4,7 @@
# Template for check_multi
#
-$opt[1] = "--lower=$MIN[1] --vertical-label num --title \"Number of Checks\" ";
+$opt[1] = "--lower-limit=$MIN[1] --vertical-label num --title \"Number of Checks\" ";
$ds_name[1] = "Executed Plugins";
$def[1] = "DEF:var1=$RRDFILE[1]:$DS[1]:AVERAGE " ;

View File

@ -0,0 +1,11 @@
--- share/pnp/templates.dist/check_ping_tick.php.orig 2017-03-21 13:39:12 UTC
+++ share/pnp/templates.dist/check_ping_tick.php
@@ -6,7 +6,7 @@
# RTA
#
$ds_name[1] = "Round Trip Times";
-$opt[1] = "--lower=0 --vertical-label \"RTA\" --title \"Ping times\" ";
+$opt[1] = "--lower-limit=0 --vertical-label \"RTA\" --title \"Ping times\" ";
$opt[1] .= rrd::darkteint();
$def[1] = rrd::def("var1", $RRDFILE[1], $DS[1], "AVERAGE") ;
$def[1] .= rrd::ticker("var1", $WARN[1], $CRIT[1]) ;

View File

@ -0,0 +1,11 @@
--- share/pnp/templates.dist/check_users.php.orig 2017-03-21 13:39:19 UTC
+++ share/pnp/templates.dist/check_users.php
@@ -4,7 +4,7 @@
# Template for check_users
#
-$opt[1] = "--lower=$MIN[1] --vertical-label \"Users\" --title \"Users\" ";
+$opt[1] = "--lower-limit=$MIN[1] --vertical-label \"Users\" --title \"Users\" ";
$def[1] = "DEF:var1=$RRDFILE[1]:$DS[1]:MAX " ;

View File

@ -0,0 +1,22 @@
--- share/pnp/templates.dist/default.php.orig 2017-03-21 13:39:25 UTC
+++ share/pnp/templates.dist/default.php
@@ -47,7 +47,7 @@ foreach ($this->DS as $KEY=>$VAL) {
$crit_min = $VAL['CRIT_MIN'];
}
if ( $VAL['MIN'] != "" && is_numeric($VAL['MIN']) ) {
- $lower = " --lower=" . $VAL['MIN'];
+ $lower = " --lower-limit=" . $VAL['MIN'];
$minimum = $VAL['MIN'];
}
if ( $VAL['MAX'] != "" && is_numeric($VAL['MAX']) ) {
@@ -55,8 +55,8 @@ foreach ($this->DS as $KEY=>$VAL) {
}
if ($VAL['UNIT'] == "%%") {
$vlabel = "%";
- $upper = " --upper=101 ";
- $lower = " --lower=0 ";
+ $upper = " --upper-limit=101 ";
+ $lower = " --lower-limit=0 ";
}
else {
$vlabel = $VAL['UNIT'];