Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Apr 2015 11:18:20 +0000 (UTC)
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r383562 - in head/net-mgmt/nagios-check_postgres: . files
Message-ID:  <201504081118.t38BIKEq055532@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504081118.t38BIKEq055532>