diff options
author | Edwin Groothuis <edwin@FreeBSD.org> | 2003-01-09 22:13:58 +0000 |
---|---|---|
committer | Edwin Groothuis <edwin@FreeBSD.org> | 2003-01-09 22:13:58 +0000 |
commit | 92fdd64a1deeeb96340ff215316114f7f00b41b8 (patch) | |
tree | 3f4a70953bb39407236d2dbc901801bbf85aea50 /net-mgmt/nrpe | |
parent | Upgrade to 5.0.1. (diff) |
Maintainer update to version 1.7
PR: ports/46903
Submitted by: Paul Dlug <paul@nerdlabs.com>
Notes
Notes:
svn path=/head/; revision=72825
Diffstat (limited to 'net-mgmt/nrpe')
-rw-r--r-- | net-mgmt/nrpe/Makefile | 7 | ||||
-rw-r--r-- | net-mgmt/nrpe/distinfo | 2 | ||||
-rw-r--r-- | net-mgmt/nrpe/pkg-install | 68 | ||||
-rw-r--r-- | net-mgmt/nrpe/pkg-plist | 1 |
4 files changed, 76 insertions, 2 deletions
diff --git a/net-mgmt/nrpe/Makefile b/net-mgmt/nrpe/Makefile index 764aa7996ebb..376ce2e921ee 100644 --- a/net-mgmt/nrpe/Makefile +++ b/net-mgmt/nrpe/Makefile @@ -6,7 +6,7 @@ # PORTNAME= nrpe -PORTVERSION= 1.5 +PORTVERSION= 1.7 PORTREVISION= 0 CATEGORIES= net MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} @@ -18,8 +18,13 @@ RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net/nagios- GNU_CONFIGURE= yes +pre-install: + @PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + ${SED} -i bak -e "s=/usr/local/bin/nrpe=${PREFIX}/sbin/nrpe=" ${WRKSRC}/init-script.freebsd + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/src/nrpe ${PREFIX}/sbin/nrpe ${INSTALL_DATA} ${WRKSRC}/nrpe.cfg ${PREFIX}/etc/nrpe.cfg-sample + ${INSTALL_SCRIPT} ${WRKSRC}/init-script.freebsd ${PREFIX}/etc/rc.d/nrpe.sh .include <bsd.port.mk> diff --git a/net-mgmt/nrpe/distinfo b/net-mgmt/nrpe/distinfo index 263e78cf6569..36922ba9be62 100644 --- a/net-mgmt/nrpe/distinfo +++ b/net-mgmt/nrpe/distinfo @@ -1 +1 @@ -MD5 (nrpe-1.5.tar.gz) = 6f9f696e24fe380839e01fc57e29206b +MD5 (nrpe-1.7.tar.gz) = f9462e9446ef1928e27a612ac5f87fdb diff --git a/net-mgmt/nrpe/pkg-install b/net-mgmt/nrpe/pkg-install new file mode 100644 index 000000000000..84d0055c289f --- /dev/null +++ b/net-mgmt/nrpe/pkg-install @@ -0,0 +1,68 @@ +#!/bin/sh +# +# $FreeBSD: /tmp/pcvs/ports/net-mgmt/nrpe/Attic/pkg-install,v 1.1 2003-01-09 22:13:58 edwin Exp $ +# + +PKG_PREFIX=${PKG_PREFIX:=/usr/local} + +user=nagios +group=nagios + +ask() { + local question default answer + + question=$1 + default=$2 + if [ -z "${PACKAGE_BUILDING}" ]; then + read -p "${question} [${default}]? " answer + fi + if [ x${answer} = x ]; then + answer=${default} + fi + echo ${answer} +} + +yesno() { + local dflt question answer + + question=$1 + dflt=$2 + while :; do + answer=$(ask "${question}" "${dflt}") + case "${answer}" in + [Yy]*) return 0;; + [Nn]*) return 1;; + esac + echo "Please answer yes or no." + done +} + +if [ x"$2" = xPRE-INSTALL ]; then + if /usr/sbin/pw groupshow "${group}" 2>/dev/null; then + echo "You already have a group \"${group}\", so I will use it." + else + echo "You need a group \"${group}\"." + if yesno "Would you like me to create it" y; then + /usr/sbin/pw groupadd ${group} -h - || exit + echo "Done." + else + echo "Please create it, and try again." + exit 1 + fi + fi + + if /usr/sbin/pw user show "${user}" 2>/dev/null; then + echo "You already have a user \"${user}\", so I will use it." + else + echo "You need a user \"${user}\"." + if yesno "Would you like me to create it" y; then + /usr/sbin/pw useradd ${user} -g ${group} -h - -d ${PKG_PREFIX}/var/nagios \ + -s /nonexistent -c "Nagios pseudo-user" || exit + echo "Done." + else + echo "Please create it, and try again." + exit 1 + fi + fi + +fi diff --git a/net-mgmt/nrpe/pkg-plist b/net-mgmt/nrpe/pkg-plist index 22b85e670342..04a829861ccb 100644 --- a/net-mgmt/nrpe/pkg-plist +++ b/net-mgmt/nrpe/pkg-plist @@ -1,2 +1,3 @@ sbin/nrpe etc/nrpe.cfg-sample +etc/rc.d/nrpe.sh |