aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/nrpe2
diff options
context:
space:
mode:
authormnag <mnag@FreeBSD.org>2006-04-30 02:28:31 +0800
committermnag <mnag@FreeBSD.org>2006-04-30 02:28:31 +0800
commit6d8099225f3f4bf67c88e8f35ffddff4d2094c0b (patch)
treed6e2eb3c53de174b280b7754b0a4e5f0679dbb71 /net-mgmt/nrpe2
parent0bc57f435a6f60fbe03f0924b0b83bb0ea5a1daf (diff)
downloadfreebsd-ports-gnome-6d8099225f3f4bf67c88e8f35ffddff4d2094c0b.tar.gz
freebsd-ports-gnome-6d8099225f3f4bf67c88e8f35ffddff4d2094c0b.tar.zst
freebsd-ports-gnome-6d8099225f3f4bf67c88e8f35ffddff4d2094c0b.zip
- Update to 2.5.1
- Fix using USE_OPENSSH after bsd.port.pre.mk - portlint(1) PR: 95811 Submitted by: Martin Matuska <martin___matuska.org> Approved by: maintainer timeout (14 days)
Diffstat (limited to 'net-mgmt/nrpe2')
-rw-r--r--net-mgmt/nrpe2/Makefile43
-rw-r--r--net-mgmt/nrpe2/distinfo6
-rw-r--r--net-mgmt/nrpe2/files/patch-pid-file76
3 files changed, 27 insertions, 98 deletions
diff --git a/net-mgmt/nrpe2/Makefile b/net-mgmt/nrpe2/Makefile
index 974ec25cb83c..88b270d3fd1b 100644
--- a/net-mgmt/nrpe2/Makefile
+++ b/net-mgmt/nrpe2/Makefile
@@ -5,36 +5,35 @@
# $FreeBSD$
#
-PORTNAME= nrpe2
-PORTVERSION= 2.0
-PORTREVISION= 1
-CATEGORIES= net-mgmt
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+PORTNAME= nrpe2
+PORTVERSION= 2.5.1
+CATEGORIES= net-mgmt
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= nagios
-DISTNAME= nrpe-${PORTVERSION}
+DISTNAME= nrpe-${PORTVERSION}
-MAINTAINER= paul@nerdlabs.com
-COMMENT= Nagios Remote Plugin Executor
+MAINTAINER= paul@nerdlabs.com
+COMMENT= Nagios Remote Plugin Executor
-RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net-mgmt/nagios-plugins
+RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net-mgmt/nagios-plugins
-GNU_CONFIGURE= yes
+GNU_CONFIGURE= yes
USE_PERL5_BUILD= yes
-USE_REINPLACE= yes
-USE_RC_SUBR= nrpe2.sh
+USE_RC_SUBR= nrpe2.sh
-PLIST_FILES= sbin/nrpe2 etc/nrpe.cfg-sample libexec/nagios/check_nrpe2
+PLIST_FILES= sbin/nrpe2 etc/nrpe.cfg-sample libexec/nagios/check_nrpe2
-CONFIGURE_ARGS+= --libexecdir=${PREFIX}/libexec/nagios --bindir=${PREFIX}/sbin --sysconfdir=${PREFIX}/etc
+CONFIGURE_ARGS= --libexecdir=${PREFIX}/libexec/nagios \
+ --bindir=${PREFIX}/sbin --sysconfdir=${PREFIX}/etc
-OPTIONS= SSL "SSL support" off \
- ARGS "Enable command arguments *POTENTIAL SECURITY RISK*" off
+OPTIONS= SSL "SSL support" off \
+ ARGS "Enable command arguments *POTENTIAL SECURITY RISK*" off
.include <bsd.port.pre.mk>
.if defined(WITH_SSL)
-USE_OPENSSL= yes
+.include "${PORTSDIR}/Mk/bsd.openssl.mk"
CONFIGURE_ARGS+= --enable-ssl
.else
CONFIGURE_ARGS+= --disable-ssl
@@ -44,9 +43,15 @@ CONFIGURE_ARGS+= --disable-ssl
CONFIGURE_ARGS+= --enable-command-args
.endif
+post-build:
+ @${REINPLACE_CMD} -e 's|nrpe.pid|nrpe2.pid|g' \
+ ${WRKSRC}/sample-config/nrpe.cfg
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/nrpe ${PREFIX}/sbin/nrpe2
- ${INSTALL_PROGRAM} ${WRKSRC}/src/check_nrpe ${PREFIX}/libexec/nagios/check_nrpe2
- ${INSTALL_DATA} ${WRKSRC}/nrpe.cfg ${PREFIX}/etc/nrpe.cfg-sample
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/check_nrpe \
+ ${PREFIX}/libexec/nagios/check_nrpe2
+ ${INSTALL_DATA} ${WRKSRC}/sample-config/nrpe.cfg \
+ ${PREFIX}/etc/nrpe.cfg-sample
.include <bsd.port.post.mk>
diff --git a/net-mgmt/nrpe2/distinfo b/net-mgmt/nrpe2/distinfo
index 40d71997f398..b0d154023cb4 100644
--- a/net-mgmt/nrpe2/distinfo
+++ b/net-mgmt/nrpe2/distinfo
@@ -1,3 +1,3 @@
-MD5 (nrpe-2.0.tar.gz) = 70ef9502a3b7e49fa520dbceabfa04d0
-SHA256 (nrpe-2.0.tar.gz) = 37402fc845c3bba69720cb3fd1598b4589e24600dced1bfaeceeb51ab801f2de
-SIZE (nrpe-2.0.tar.gz) = 52157
+MD5 (nrpe-2.5.1.tar.gz) = e083553deaf47a79fd23906d823afc59
+SHA256 (nrpe-2.5.1.tar.gz) = a23a0a37d81900d03884898bd0ae9b9da95348cc4a08695a4c229337c83fbe5e
+SIZE (nrpe-2.5.1.tar.gz) = 100382
diff --git a/net-mgmt/nrpe2/files/patch-pid-file b/net-mgmt/nrpe2/files/patch-pid-file
deleted file mode 100644
index 07173a557376..000000000000
--- a/net-mgmt/nrpe2/files/patch-pid-file
+++ /dev/null
@@ -1,76 +0,0 @@
---- orig/nrpe-2.0/src/Makefile.in Tue Aug 5 07:01:53 2003
-+++ src/Makefile.in Tue May 17 00:25:33 2005
-@@ -9,7 +9,7 @@
- SRC_COMMON=../common
-
- CC=@CC@
--CFLAGS=@CFLAGS@ @DEFS@
-+CFLAGS=@CFLAGS@ @DEFS@ -DPID_DIR=\"/var/run/\"
- LDFLAGS=@LDFLAGS@ @LIBS@
- SOCKETLIBS=@SOCKETLIBS@
-
---- orig/nrpe-2.0/src/nrpe.c Tue Sep 9 04:52:37 2003
-+++ src/nrpe.c Tue May 17 00:24:29 2005
-@@ -23,6 +23,7 @@
- #include "nrpe.h"
- #include "utils.h"
-
-+
- #ifdef HAVE_SSL
- #include "dh.h"
- #endif
-@@ -83,7 +84,6 @@
- #endif
-
-
--
- int main(int argc, char **argv){
- int result=OK;
- int x;
-@@ -219,7 +219,45 @@
-
- /* else daemonize and start listening for requests... */
- else if(fork()==0){
--
-+#ifdef PID_DIR
-+ int fd;
-+ int pid_written = 0;
-+ char *pid_fname;
-+ char pbuf[16];
-+ char *bname = strrchr(argv[0], '/'); /* basename from XPG4.2 would be nice */
-+
-+ bname = !bname ? argv[0] : ++bname;
-+ pid_fname = malloc(strlen(PID_DIR) + strlen(bname) + sizeof(".pid"));
-+ strcpy(pid_fname, PID_DIR);
-+ strcat(pid_fname, bname); strcat(pid_fname, ".pid");
-+ if ((fd = open (pid_fname, O_RDONLY)) >= 0) {
-+ int status = read (fd, pbuf, (sizeof pbuf) - 1);
-+ close (fd);
-+ if (status > 0) {
-+ int pid;
-+ pbuf [status] = 0;
-+ pid = atoi (pbuf);
-+ /* If the previous server process is not still running,
-+ write a new pid file immediately. */
-+ if (pid && (pid == getpid() || kill (pid, 0) < 0)) {
-+ unlink (pid_fname);
-+ } else {
-+ syslog(LOG_ERR,"There's already a nrpe server running.");
-+ free(pid_fname);
-+ return STATE_CRITICAL;
-+ }
-+ }
-+ }
-+ if ((fd = open (pid_fname, O_WRONLY | O_CREAT, 0644)) >= 0) {
-+ sprintf (pbuf, "%d\n", (int)getpid ());
-+ write (fd, pbuf, strlen (pbuf));
-+ close (fd);
-+ } else {
-+ syslog(LOG_ERR,"Can not write the pidfile(%s).", pid_fname);
-+ }
-+ free(pid_fname);
-+#endif
-+
- /* we're a daemon - set up a new process group */
- setsid();
-