Date: Thu, 9 Jan 2003 14:20:05 -0800 (PST) From: Paul Dlug <paul@nerdlabs.com> To: freebsd-ports@FreeBSD.org Subject: Re: ports/46903: Update nrpe to 1.7 Message-ID: <200301092220.h09MK5RK034517@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/46903; it has been noted by GNATS. From: Paul Dlug <paul@nerdlabs.com> To: FreeBSD-gnats-submit@freebsd.org Cc: Subject: Re: ports/46903: Update nrpe to 1.7 Date: Thu, 9 Jan 2003 17:13:23 -0500 (EST) >Submitter-Id: current-users >Originator: Paul Dlug >Organization: >Confidential: no >Synopsis: Re: ports/46903: Update nrpe to 1.7 >Severity: serious >Priority: medium >Category: ports >Class: update >Release: FreeBSD 4.7-STABLE i386 >Environment: System: FreeBSD lugnut.aps.org 4.7-STABLE FreeBSD 4.7-STABLE #5: Thu Jan 9 11:43:01 EST 2003 root@lugnut.aps.org:/usr/obj/usr/src/sys/LUGNUT i386 >Description: Diff provided as requested instead of original shar. >How-To-Repeat: >Fix: --- nrpe.diff begins here --- diff -ruN nrpe.bak/Makefile nrpe/Makefile --- nrpe.bak/Makefile Thu Jan 9 17:08:07 2003 +++ nrpe/Makefile Thu Jan 9 16:24:32 2003 @@ -6,7 +6,7 @@ # PORTNAME= nrpe -PORTVERSION= 1.5 +PORTVERSION= 1.7 PORTREVISION= 0 CATEGORIES= net MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} @@ -18,8 +18,14 @@ GNU_CONFIGURE= yes +pre-install: + @PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + ${SED} -i bak -e "s=/usr/local/bin/nrpe=/usr/local/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 -ruN nrpe.bak/distinfo nrpe/distinfo --- nrpe.bak/distinfo Thu Jan 9 17:08:07 2003 +++ nrpe/distinfo Thu Jan 9 16:06:45 2003 @@ -1 +1 @@ -MD5 (nrpe-1.5.tar.gz) = 6f9f696e24fe380839e01fc57e29206b +MD5 (nrpe-1.7.tar.gz) = f9462e9446ef1928e27a612ac5f87fdb diff -ruN nrpe.bak/pkg-install nrpe/pkg-install --- nrpe.bak/pkg-install Wed Dec 31 19:00:00 1969 +++ nrpe/pkg-install Thu Jan 9 16:16:05 2003 @@ -0,0 +1,68 @@ +#!/bin/sh +# +# $FreeBSD: ports/net/nagios/pkg-install,v 1.2 2002/05/29 06:35:16 kuriyama 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 -ruN nrpe.bak/pkg-plist nrpe/pkg-plist --- nrpe.bak/pkg-plist Thu Jan 9 17:08:08 2003 +++ nrpe/pkg-plist Thu Jan 9 16:26:31 2003 @@ -1,2 +1,3 @@ sbin/nrpe etc/nrpe.cfg-sample +etc/rc.d/nrpe.sh --- nrpe.diff ends here --- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200301092220.h09MK5RK034517>