Skip site navigation (1)Skip section navigation (2)
Date:      Thu,  9 Jan 2003 16:30:53 -0500 (EST)
From:      Paul Dlug <paul@nerdlabs.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/46903: Update nrpe to 1.7
Message-ID:  <20030109213053.99C0C201@lugnut.aps.org>

next in thread | raw e-mail | index | archive | help

>Number:         46903
>Category:       ports
>Synopsis:       Update nrpe to 1.7
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 09 13:40:03 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Paul Dlug
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
>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:
	Update of the nrpe port to version 1.7 (from 1.5) which adds some new options and bug fixes. Added a script to add the necessary user (nagios) to run the daemon under, copied from the nagios port. Also added the installation of the provided startup script for freebsd.
>How-To-Repeat:
	
>Fix:

	

--- nrpe.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	nrpe
#	nrpe/Makefile
#	nrpe/distinfo
#	nrpe/pkg-comment
#	nrpe/pkg-descr
#	nrpe/pkg-plist
#	nrpe/pkg-install
#
echo c - nrpe
mkdir -p nrpe > /dev/null 2>&1
echo x - nrpe/Makefile
sed 's/^X//' >nrpe/Makefile << 'END-of-nrpe/Makefile'
X# New ports collection makefile for:	nrpe
X# Date created:				1 Aug 2002
X# Whom:					Paul Dlug<paul@nerdlabs.com>
X#
X# $FreeBSD: ports/net/nrpe/Makefile,v 1.1 2003/01/03 02:49:08 edwin Exp $
X#
X
XPORTNAME=	nrpe
XPORTVERSION=	1.7
XPORTREVISION=	0
XCATEGORIES=	net
XMASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=	nagios
X
XMAINTAINER=	paul@nerdlabs.com
X
XRUN_DEPENDS=    ${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net/nagios-plugins
X
XGNU_CONFIGURE=	yes
X
Xpre-install:
X	@PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
X	${SED} -i bak -e "s=/usr/local/bin/nrpe=/usr/local/sbin/nrpe=" ${WRKSRC}/init-script.freebsd
X
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/src/nrpe ${PREFIX}/sbin/nrpe
X	${INSTALL_DATA} ${WRKSRC}/nrpe.cfg ${PREFIX}/etc/nrpe.cfg-sample
X	${INSTALL_SCRIPT} ${WRKSRC}/init-script.freebsd ${PREFIX}/etc/rc.d/nrpe.sh
X
X.include <bsd.port.mk>
END-of-nrpe/Makefile
echo x - nrpe/distinfo
sed 's/^X//' >nrpe/distinfo << 'END-of-nrpe/distinfo'
XMD5 (nrpe-1.7.tar.gz) = f9462e9446ef1928e27a612ac5f87fdb
END-of-nrpe/distinfo
echo x - nrpe/pkg-comment
sed 's/^X//' >nrpe/pkg-comment << 'END-of-nrpe/pkg-comment'
XNagios Remote Plugin Executor
END-of-nrpe/pkg-comment
echo x - nrpe/pkg-descr
sed 's/^X//' >nrpe/pkg-descr << 'END-of-nrpe/pkg-descr'
Xnrpe is used to execute Nagios plugins on remote hosts and report the results
Xto the main Nagios server. From the Nagios homepage:
X
XAllows you to execute "local" plugins (like check_disk, check_procs, etc.) on 
Xremote hosts. The check_nrpe plugin is called from Nagios and actually makes 
Xthe plugin requests to the remote host. Requires that nrpe be running on the 
Xremote host (either as a standalone daemon or as a service under inetd). 
X
XWWW: http://www.nagios.org/
END-of-nrpe/pkg-descr
echo x - nrpe/pkg-plist
sed 's/^X//' >nrpe/pkg-plist << 'END-of-nrpe/pkg-plist'
Xsbin/nrpe
Xetc/nrpe.cfg-sample
Xetc/rc.d/nrpe.sh
END-of-nrpe/pkg-plist
echo x - nrpe/pkg-install
sed 's/^X//' >nrpe/pkg-install << 'END-of-nrpe/pkg-install'
X#!/bin/sh
X#
X#	$FreeBSD: ports/net/nagios/pkg-install,v 1.2 2002/05/29 06:35:16 kuriyama Exp $
X#
X
XPKG_PREFIX=${PKG_PREFIX:=/usr/local}
X
Xuser=nagios
Xgroup=nagios
X
Xask() {
X    local question default answer
X
X    question=$1
X    default=$2
X    if [ -z "${PACKAGE_BUILDING}" ]; then
X        read -p "${question} [${default}]? " answer
X    fi
X    if [ x${answer} = x ]; then
X        answer=${default}
X    fi
X    echo ${answer}
X}
X
Xyesno() {
X    local dflt question answer
X
X    question=$1
X    dflt=$2
X    while :; do
X        answer=$(ask "${question}" "${dflt}")
X        case "${answer}" in
X        [Yy]*)          return 0;;
X        [Nn]*)          return 1;;
X        esac
X        echo "Please answer yes or no."
X    done
X}
X
Xif [ x"$2" = xPRE-INSTALL ]; then
X    if /usr/sbin/pw groupshow "${group}" 2>/dev/null; then
X        echo "You already have a group \"${group}\", so I will use it."
X    else
X        echo "You need a group \"${group}\"."
X        if yesno "Would you like me to create it" y; then
X            /usr/sbin/pw groupadd ${group} -h - || exit
X            echo "Done."
X        else
X            echo "Please create it, and try again."
X            exit 1
X        fi
X    fi
X
X    if /usr/sbin/pw user show "${user}" 2>/dev/null; then
X        echo "You already have a user \"${user}\", so I will use it."
X    else
X        echo "You need a user \"${user}\"."
X        if yesno "Would you like me to create it" y; then
X            /usr/sbin/pw useradd ${user} -g ${group} -h - -d ${PKG_PREFIX}/var/nagios \
X                -s /nonexistent -c "Nagios pseudo-user" || exit
X            echo "Done."
X        else
X            echo "Please create it, and try again."
X            exit 1
X        fi
X    fi
X
Xfi
END-of-nrpe/pkg-install
exit
--- nrpe.shar ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:

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?20030109213053.99C0C201>