svn commit: r383562 - in head/net-mgmt/nagios-check_postgres: . files
Matthew Seaman
matthew at FreeBSD.org
Wed Apr 8 11:18:21 UTC 2015
Author: matthew
Date: Wed Apr 8 11:18:19 2015
New Revision: 383562
URL: https://svnweb.freebsd.org/changeset/ports/383562
Log:
I've had reports from colleagues of check_postgres not finding psql
when run via nrpe. Hardcode the directory (${LOCALBASE}/bin) expected
to contain the postgres client and other binaries.
Added:
head/net-mgmt/nagios-check_postgres/files/
head/net-mgmt/nagios-check_postgres/files/patch-check__postgres.pl (contents, props changed)
Modified:
head/net-mgmt/nagios-check_postgres/Makefile
Modified: head/net-mgmt/nagios-check_postgres/Makefile
==============================================================================
--- head/net-mgmt/nagios-check_postgres/Makefile Wed Apr 8 10:58:05 2015 (r383561)
+++ head/net-mgmt/nagios-check_postgres/Makefile Wed Apr 8 11:18:19 2015 (r383562)
@@ -3,7 +3,7 @@
PORTNAME= check_postgres
PORTVERSION= 2.21.0
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= net-mgmt databases perl5
MASTER_SITES= http://bucardo.org/downloads/
PKGNAMEPREFIX= nagios-
@@ -93,6 +93,9 @@ CACTI_LINKS= dbstats
.include <bsd.port.options.mk>
+post-patch:
+ ${SED} -i.bak -e s,%%LOCALBASE%%,${LOCALBASE}, ${WRKSRC}/check_postgres.pl
+
post-install:
.if ${PORT_OPTIONS:MNAGIOS}
@${MKDIR} ${STAGEDIR}${NAGIOS_PLUGINS}
Added: head/net-mgmt/nagios-check_postgres/files/patch-check__postgres.pl
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net-mgmt/nagios-check_postgres/files/patch-check__postgres.pl Wed Apr 8 11:18:19 2015 (r383562)
@@ -0,0 +1,11 @@
+--- check_postgres.pl.orig 2015-04-08 10:32:58 UTC
++++ check_postgres.pl
+@@ -47,7 +47,7 @@ our $DEFAULT_OUTPUT = 'nagios';
+
+ ## If psql binaries are not in your path, it is recommended to hardcode it here,
+ ## as an alternative to the --PGBINDIR option
+-$PGBINDIR = '';
++$PGBINDIR = '%%LOCALBASE%%/bin';
+
+ ## If this is true, $opt{PSQL} and $opt{PGBINDIR} are disabled for security reasons
+ our $NO_PSQL_OPTION = 1;
More information about the svn-ports-head
mailing list