[csw-devel] SF.net SVN: gar:[3123] csw/mgar/pkg
j_arndt at users.sourceforge.net
j_arndt at users.sourceforge.net
Mon Feb 16 15:19:38 CET 2009
Revision: 3123
http://gar.svn.sourceforge.net/gar/?rev=3123&view=rev
Author: j_arndt
Date: 2009-02-16 14:19:38 +0000 (Mon, 16 Feb 2009)
Log Message:
-----------
nrpe: Initial commit
Added Paths:
-----------
csw/mgar/pkg/nrpe/
csw/mgar/pkg/nrpe/branches/
csw/mgar/pkg/nrpe/tags/
csw/mgar/pkg/nrpe/trunk/
csw/mgar/pkg/nrpe/trunk/Makefile
csw/mgar/pkg/nrpe/trunk/checksums
csw/mgar/pkg/nrpe/trunk/files/
csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.checkinstall
csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.depend
csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.gspec
csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.postinstall
csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.preinstall
csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.preremove
csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.prototype
csw/mgar/pkg/nrpe/trunk/files/CSWnrpeplugin.depend
csw/mgar/pkg/nrpe/trunk/files/CSWnrpeplugin.gspec
csw/mgar/pkg/nrpe/trunk/files/CSWnrpeplugin.prototype
csw/mgar/pkg/nrpe/trunk/files/configure.diff
csw/mgar/pkg/nrpe/trunk/files/doc.diff
csw/mgar/pkg/nrpe/trunk/files/makefile.diff
csw/mgar/pkg/nrpe/trunk/files/nrpe
csw/mgar/pkg/nrpe/trunk/files/nrpe.xml
csw/mgar/pkg/nrpe/trunk/files/patch.diff
csw/mgar/pkg/nrpe/trunk/files/svc-nrpe
Property changes on: csw/mgar/pkg/nrpe/trunk
___________________________________________________________________
Added: svn:ignore
+ cookies
download
work
Added: svn:externals
+ gar https://gar.svn.sf.net/svnroot/gar/csw/mgar/gar/v1
Added: csw/mgar/pkg/nrpe/trunk/Makefile
===================================================================
--- csw/mgar/pkg/nrpe/trunk/Makefile (rev 0)
+++ csw/mgar/pkg/nrpe/trunk/Makefile 2009-02-16 14:19:38 UTC (rev 3123)
@@ -0,0 +1,46 @@
+GARNAME = nrpe
+GARVERSION = 2.12
+CATEGORIES = apps
+
+DESCRIPTION = NRPE daemon for Nagios
+define BLURB
+ NRPE allows you to remotely execute Nagios plugins on other Linux/Unix machines. This allows you to monitor remote machine metrics (disk usage, CPU load, etc.). NRPE can also communicate with some of the Windows agent addons, so you can execute scripts and check metrics on remote Windows machines as well.
+endef
+
+#MASTER_SITES = http://surfnet.dl.sourceforge.net/sourceforge/nagios/
+MASTER_SITES = $(SF_MASTERS)
+DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz
+DISTFILES += $(call admfiles,CSWnrpe, prototype checkinstall preinstall postinstall preremove depend)
+DISTFILES += svc-nrpe nrpe.xml nrpe
+DISTFILES += $(call admfiles,CSWnrpeplugin, prototype depend)
+
+CONFIGURE_ARGS = $(DIRPATHS)
+CONFIGURE_ARGS += --with-ssl-lib=/opt/csw/lib
+CONFIGURE_ARGS += --with-ssl-inc=/opt/csw/include
+CONFIGURE_ARGS += --with-ssl-dir=/opt/csw/bin
+CONFIGURE_ARGS += --with-kerberos-inc=/opt/csw/include
+CONFIGURE_ARGS += --prefix=/opt/csw/nagios
+CONFIGURE_ARGS += --exec-prefix=/opt/csw/nagios
+CONFIGURE_ARGS += --with-command-user=nagios
+CONFIGURE_ARGS += --with-command-group=nagios
+
+PATCHFILES = patch.diff # Removal of LOG_AUTHPRIV and LOG_FTP
+ # Solaris doesn't have these log facilities
+PATCHFILES += configure.diff
+PATCHFILES += makefile.diff
+PATCHFILES += doc.diff # changes made to global Makefile.in to copy some docs
+
+sysconfdir ?= $(prefix)/nagios/etc
+bindir ?= $(prefix)/bin
+libexecdir ?= $(prefix)/libexec/nagios-plugins
+datadir ?= $(prefix)/share
+
+
+#EXTRA_LIB = /opt/csw/lib
+
+TEST_TARGET = all
+
+INSTALL_ARGS += install-docs
+INSTALL_ARGS += install-daemon-config
+
+include gar/category.mk
Added: csw/mgar/pkg/nrpe/trunk/checksums
===================================================================
--- csw/mgar/pkg/nrpe/trunk/checksums (rev 0)
+++ csw/mgar/pkg/nrpe/trunk/checksums 2009-02-16 14:19:38 UTC (rev 3123)
@@ -0,0 +1,18 @@
+b2d75e2962f1e3151ef58794d60c9e97 download/nrpe-2.12.tar.gz
+cc0aa5807e491e4ae15124da5aca4be1 download/CSWnrpe.gspec
+244f45e40f17aa98a0bb1a93ed7b9554 download/CSWnrpe.prototype
+bda68135e2b65da40c3d2b68a3b8dc78 download/CSWnrpe.checkinstall
+53eea7ed36535bb6cbe1d6fe0aae3508 download/CSWnrpe.preinstall
+71c9056ac6d0010a748745a405385d55 download/CSWnrpe.postinstall
+393872a95d2b9ec90363664c31074415 download/CSWnrpe.preremove
+c585258595292cc43525385c87e1d126 download/CSWnrpe.depend
+ec1857a4400022e3eec874c34e2b7232 download/svc-nrpe
+1ee84a3e24cd4237bbb1fae59fc1d4ca download/nrpe.xml
+ec1857a4400022e3eec874c34e2b7232 download/nrpe
+54aebe8f3d7bc8d2ec5ea1954d859b10 download/CSWnrpeplugin.gspec
+e22a7817c7665e79bcbad7e091375be9 download/CSWnrpeplugin.prototype
+a3658628a24ac990a0e3b552a9fcb8db download/CSWnrpeplugin.depend
+5b02d4385daaea2a8c13903539aa6189 download/patch.diff
+4b51476c782d2c5764d10f8ed530ada0 download/configure.diff
+90d1e4acfa3f031b20fc7e229387d0e6 download/makefile.diff
+34edc5baa80d11bae0ddd754e2e72b23 download/doc.diff
Added: csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.checkinstall
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.checkinstall (rev 0)
+++ csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.checkinstall 2009-02-16 14:19:38 UTC (rev 3123)
@@ -0,0 +1,50 @@
+# See if user group are needed
+NEEDNAGUSER=0
+NEEDNAGGROUP=0
+NEEDCMDGROUP=0
+
+#First check target machines password file, THEN check
+#NIS/NIS+/whatever
+
+grep '^nagios:' /etc/passwd >/dev/null
+if [ $? -ne 0 ] ; then
+ getent passwd nagios >/dev/null
+ if [ $? -ne 0 ] ; then
+ NEEDNAGUSER=1
+ fi
+fi
+
+grep '^nagios:' /etc/group >/dev/null
+if [ $? -ne 0 ] ; then
+ getent group nagios >/dev/null
+ if [ $? -ne 0 ] ; then
+ NEEDNAGGROUP=1
+ fi
+fi
+
+if [ "$NEEDNAGUSER" = 1 ] ; then
+ echo "***"
+ echo "User nagios must exist for this package install."
+ echo "nagios user will be added."
+ ADDNAGUSER=1
+else
+ echo "nagios user detected"
+fi
+
+if [ "$NEEDNAGGROUP" = 1 ] ; then
+ echo "***"
+ echo "Group nagios must exist for this package install."
+ echo "nagios group will be added."
+ ADDNAGGROUP=1
+else
+ echo "nagios group detected"
+fi
+
+# Make env variables available to other packaging scripts
+
+cat >$1 <<!
+CLASSES='$CLASSES'
+NEEDNAGUSER='$NEEDNAGUSER'
+NEEDNAGGROUP='$NEEDNAGGROUP'
+NEEDCMDGROUP='$NEEDCMDGROUP'
+!
Added: csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.depend
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.depend (rev 0)
+++ csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.depend 2009-02-16 14:19:38 UTC (rev 3123)
@@ -0,0 +1,2 @@
+P CSWosslrt openssl_rt - Openssl runtime libraries
+P CSWtcpwrap tcpwrappers - (ipv6.4 patched) lib and tools for pre-screening tcp connections
Added: csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.gspec
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.gspec (rev 0)
+++ csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.gspec 2009-02-16 14:19:38 UTC (rev 3123)
@@ -0,0 +1,9 @@
+%var bitname nrpe
+%var pkgname CSWnrpe
+%include url file://%{PKGLIB}/csw_dyndepend.gspec
+#%copyright url file://%{WORKSRC}/LICENSE
+%var SERVICE_CONF_FILES /opt/csw/nagios/etc/nrpe.cfg
+%var RC_INIT_SCRIPT nrpe
+%var SMF_SCRIPT svc-nrpe
+%var SMF_MANIFEST nrpe.xml
+%include url file://%{PKGLIB}/smf_enabled.gspec
Added: csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.postinstall
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.postinstall (rev 0)
+++ csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.postinstall 2009-02-16 14:19:38 UTC (rev 3123)
@@ -0,0 +1,70 @@
+# postinstall for nrpe package
+# 2007-01-19 Add csw.conf support
+# 2007-09-11 Fix PKG_INSTALL_ROOT usage. BASEDIR is not used for non
+# relocatable packages.
+#
+
+# daemons are started by default
+enable_daemon=yes
+
+# Source csw.conf, if it exists
+if [ -f $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf ] ; then
+ . $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf
+fi
+if [ -f $PKG_INSTALL_ROOT/etc/opt/csw/csw.conf ] ; then
+ . $PKG_INSTALL_ROOT/etc/opt/csw/csw.conf
+fi
+
+# If defined, autoenable for the specific daemon name takes precedence
+if [ "$autoenable_nrpe" = "no" ] ; then
+ enable_daemon=no
+elif [ "$autoenable_daemons" = "no" -a ! -n "$autoenable_nrpe" ] ; then
+ enable_daemon=no
+fi
+
+# Set variable for the availability of SMF
+smf=no
+if [ -f /usr/sbin/svccfg -a -f $BASEDIR/usr/sbin/svcadm ]
+ then
+ smf=yes
+fi
+
+# Stop nrpe if it is running
+if pgrep nrpe >/dev/null 2>&1 ; then
+ echo "## Stopping nrpe"
+ if [ $smf = yes ]; then
+ /usr/sbin/svcadm disable svc:/application/cswnrpe >/dev/null 2>&1
+ else
+ /etc/init.d/cswnrpe stop >/dev/null 2>&1
+ fi
+ while pgrep nrpe > /dev/null
+ do
+ sleep 1
+ done
+fi
+
+if [ $smf = yes ]; then
+ # Register with SMF
+ echo "Configuring service in SMF"
+ /usr/sbin/svccfg import /opt/csw/var/svc/manifest/application/nrpe.xml >/dev/null 2>&1
+ /usr/sbin/svcadm disable svc:application/cswnrpe >/dev/null 2>&1
+ echo "nrpe is using Service Management Facility. The FMRI is:"
+ echo " svc:/application/cswnrpe:default"
+fi
+
+# Start nrpe
+if [ "$enable_daemon" = "yes" ] ; then
+ if [ -f $BASEDIR/opt/csw/nagios/etc/nrpe.cfg ]; then
+ echo "## Starting nrpe"
+ if [ $smf = yes ]; then
+ /usr/sbin/svcadm enable svc:/application/cswnrpe >/dev/null 2>&1
+ else
+ /etc/init.d/cswnrpe start >/dev/null 2>&1
+ fi
+ else
+ echo "## Not starting nrpe - configuration file not found"
+ if [ $smf = yes ] ; then
+ /usr/sbin/svcadm disable svc:/application/cswnrpe >/dev/null 2>&1
+ fi
+ fi
+fi
Added: csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.preinstall
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.preinstall (rev 0)
+++ csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.preinstall 2009-02-16 14:19:38 UTC (rev 3123)
@@ -0,0 +1,23 @@
+# This script exists to make sure the required user
+# accounts nagios and groups nagios exist.
+# 2006-02-27: group nagioscm is required.
+# 2007-09-11 Fix PKG_INSTALL_ROOT usage. BASEDIR is not used for non
+# relocatable packages.
+
+#If installing package on a filesystem tree not running the OS; then exit.
+if [ ! x"$PKG_INSTALL_ROOT" = x"" ] ; then exit 0 ; fi
+
+NAGIOSHOME=/opt/csw/nagios
+
+if [ "$NEEDNAGGROUP" = 1 ] ; then
+ echo adding nagios group
+ /usr/sbin/groupadd nagios
+fi
+
+if [ "$NEEDNAGUSER" = 1 ] ; then
+ echo adding nagios user
+ /usr/sbin/useradd -g nagios nagios
+ /usr/sbin/usermod -s /bin/false -d $NAGIOSHOME nagios
+fi
+
+exit 0
Added: csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.preremove
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.preremove (rev 0)
+++ csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.preremove 2009-02-16 14:19:38 UTC (rev 3123)
@@ -0,0 +1,27 @@
+# nrpe - preremove script
+# 2007-09-11 Fix PKG_INSTALL_ROOT usage. BASEDIR is not used for non
+# relocatable packages.
+#
+# Stop nagios if it is running.
+
+#If removing package from a filesystem tree not running the OS; then exit.
+if [ ! x"$PKG_INSTALL_ROOT" = x"" ] ; then exit 0 ; fi
+
+smf=no
+if [ -f /usr/sbin/svccfg -a -f /usr/sbin/svcadm ] ; then smf=yes ; fi
+
+ echo "## Stopping nrpe"
+ if [ $smf = yes ]
+ then
+ # Disable service
+ /usr/sbin/svcadm disable -s svc:application/cswnrpe:default >/dev/null 2>&1
+ else
+ /etc/init.d/cswnrpe stop >/dev/null 2>&1
+ fi
+
+if [ $smf = yes ] ; then
+ # Unregister with SMF
+ /usr/sbin/svccfg delete svc:application/cswnrpe:default >/dev/null 2>&1
+fi
+
+exit 0
Added: csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.prototype
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.prototype (rev 0)
+++ csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.prototype 2009-02-16 14:19:38 UTC (rev 3123)
@@ -0,0 +1,11 @@
+d none /opt/csw/bin 0755 nagios nagios
+f none /opt/csw/bin/nrpe 0775 nagios nagios
+1 f none /opt/csw/nagios/etc/nrpe.cfg 0644 root bin
+d none /opt/csw/share/doc/nrpe 0755 root bin
+f none /opt/csw/share/doc/nrpe/NRPE.pdf 0644 root bin
+f none /opt/csw/share/doc/nrpe/LEGAL 0644 root bin
+f none /opt/csw/share/doc/nrpe/README 0644 root bin
+f none /opt/csw/share/doc/nrpe/README.SSL 0644 root bin
+f none /opt/csw/share/doc/nrpe/SECURITY 0644 root bin
+i depend=CSWnrpe.depend
+i pkginfo=CSWnrpe.pkginfo
Added: csw/mgar/pkg/nrpe/trunk/files/CSWnrpeplugin.depend
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/CSWnrpeplugin.depend (rev 0)
+++ csw/mgar/pkg/nrpe/trunk/files/CSWnrpeplugin.depend 2009-02-16 14:19:38 UTC (rev 3123)
@@ -0,0 +1 @@
+P CSWosslrt openssl_rt - Openssl runtime libraries
Added: csw/mgar/pkg/nrpe/trunk/files/CSWnrpeplugin.gspec
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/CSWnrpeplugin.gspec (rev 0)
+++ csw/mgar/pkg/nrpe/trunk/files/CSWnrpeplugin.gspec 2009-02-16 14:19:38 UTC (rev 3123)
@@ -0,0 +1,4 @@
+%var bitname nrpeplugin
+%var pkgname CSWnrpeplugin
+%include url file://%{PKGLIB}/csw_dyndepend.gspec
+#%copyright url file://%{WORKSRC}/LICENSE
Added: csw/mgar/pkg/nrpe/trunk/files/CSWnrpeplugin.prototype
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/CSWnrpeplugin.prototype (rev 0)
+++ csw/mgar/pkg/nrpe/trunk/files/CSWnrpeplugin.prototype 2009-02-16 14:19:38 UTC (rev 3123)
@@ -0,0 +1,4 @@
+d none /opt/csw/libexec/nagios-plugins 0755 root bin
+f none /opt/csw/libexec/nagios-plugins/check_nrpe 0775 root bin
+i depend=CSWnrpeplugin.depend
+i pkginfo=CSWnrpeplugin.pkginfo
Added: csw/mgar/pkg/nrpe/trunk/files/configure.diff
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/configure.diff (rev 0)
+++ csw/mgar/pkg/nrpe/trunk/files/configure.diff 2009-02-16 14:19:38 UTC (rev 3123)
@@ -0,0 +1,12 @@
+diff --speed-large-files --minimal -Nru nrpe-2.12.orig/configure nrpe-2.12/configure
+--- nrpe-2.12.orig/configure 2008-03-10 22:04:41.000000000 +0100
++++ nrpe-2.12/configure 2008-12-23 13:30:12.640927821 +0100
+@@ -6179,7 +6179,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lwrap $LIBS"
++LIBS="-lsocket -lwrap $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
Added: csw/mgar/pkg/nrpe/trunk/files/doc.diff
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/doc.diff (rev 0)
+++ csw/mgar/pkg/nrpe/trunk/files/doc.diff 2009-02-16 14:19:38 UTC (rev 3123)
@@ -0,0 +1,36 @@
+diff --speed-large-files --minimal -Nru nrpe-2.12.orig/Makefile.in nrpe-2.12/Makefile.in
+--- nrpe-2.12.orig/Makefile.in 2008-12-25 13:05:01.688902701 +0100
++++ nrpe-2.12/Makefile.in 2008-12-25 13:04:44.279858247 +0100
+@@ -8,6 +8,7 @@
+ # Source code directories
+ SRC_BASE=./src/
+ SRC_INCLUDE=./include/
++DOC_BASE=./docs/
+
+ CC=@CC@
+ CFLAGS=@CFLAGS@ @DEFS@
+@@ -19,6 +20,8 @@
+ BINDIR=@bindir@
+ SBINDIR=@sbindir@
+ LIBEXECDIR=@libexecdir@
++DATADIR=@datadir@
++DOCDIR=$(DATADIR)/doc/nrpe
+ INSTALL=@INSTALL@
+ NAGIOS_INSTALL_OPTS=
+ NRPE_INSTALL_OPTS=
+@@ -62,6 +65,15 @@
+ $(INSTALL) -m 775 $(NAGIOS_INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
+ $(INSTALL) -m 644 $(NRPE_INSTALL_OPTS) sample-config/nrpe.cfg $(DESTDIR)$(CFGDIR)
+
++install-docs:
++ $(INSTALL) -m 775 $(NAGIOS_INSTALL_OPTS) -d $(DESTDIR)$(DOCDIR)
++ $(INSTALL) -m 644 $(NRPE_INSTALL_OPTS) $(DOC_BASE)/NRPE.pdf $(DESTDIR)$(DOCDIR)
++ $(INSTALL) -m 644 $(NRPE_INSTALL_OPTS) ./LEGAL $(DESTDIR)$(DOCDIR)
++ $(INSTALL) -m 644 $(NRPE_INSTALL_OPTS) ./README $(DESTDIR)$(DOCDIR)
++ $(INSTALL) -m 644 $(NRPE_INSTALL_OPTS) ./README.SSL $(DESTDIR)$(DOCDIR)
++ $(INSTALL) -m 644 $(NRPE_INSTALL_OPTS) ./SECURITY $(DESTDIR)$(DOCDIR)
++
++
+ clean:
+ cd $(SRC_BASE); $(MAKE) $@ ; cd ..
+ rm -f core
Added: csw/mgar/pkg/nrpe/trunk/files/makefile.diff
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/makefile.diff (rev 0)
+++ csw/mgar/pkg/nrpe/trunk/files/makefile.diff 2009-02-16 14:19:38 UTC (rev 3123)
@@ -0,0 +1,28 @@
+diff --speed-large-files --minimal -Nru nrpe-2.12.orig/Makefile.in nrpe-2.12/Makefile.in
+--- nrpe-2.12.orig/Makefile.in 2007-03-14 16:30:05.000000000 +0100
++++ nrpe-2.12/Makefile.in 2008-12-23 21:18:00.782772164 +0100
+@@ -20,8 +20,8 @@
+ SBINDIR=@sbindir@
+ LIBEXECDIR=@libexecdir@
+ INSTALL=@INSTALL@
+-NAGIOS_INSTALL_OPTS=@NAGIOS_INSTALL_OPTS@
+-NRPE_INSTALL_OPTS=@NRPE_INSTALL_OPTS@
++NAGIOS_INSTALL_OPTS=
++NRPE_INSTALL_OPTS=
+
+ INIT_DIR=@init_dir@
+ INIT_OPTS=-o root -g root
+diff --speed-large-files --minimal -Nru nrpe-2.12.orig/src/Makefile.in nrpe-2.12/src/Makefile.in
+--- nrpe-2.12.orig/src/Makefile.in 2007-08-13 19:10:07.000000000 +0200
++++ nrpe-2.12/src/Makefile.in 2008-12-23 21:21:13.784808266 +0100
+@@ -24,8 +24,8 @@
+ SBINDIR=@sbindir@
+ LIBEXECDIR=@libexecdir@
+ INSTALL=@INSTALL@
+-NAGIOS_INSTALL_OPTS=@NAGIOS_INSTALL_OPTS@
+-NRPE_INSTALL_OPTS=@NRPE_INSTALL_OPTS@
++NAGIOS_INSTALL_OPTS=
++NRPE_INSTALL_OPTS=
+
+ # Generated automatically from configure script
+ SNPRINTF_O=@SNPRINTF_O@
Added: csw/mgar/pkg/nrpe/trunk/files/nrpe
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/nrpe (rev 0)
+++ csw/mgar/pkg/nrpe/trunk/files/nrpe 2009-02-16 14:19:38 UTC (rev 3123)
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# Copyright (c) 1992 - 2001 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#ident "@(#)nrpe 1.19 01/12/05 SMI"
+# Modified for CSW by Alex Moore 2005-12-03
+# 2007-08-18 Add pid file support.
+# 2007-08-19 Fix nagios uid used for pgrep. Thanks to Will McDonald for this.
+
+CONFIG_FILE=/etc/opt/csw/nrpe.cfg
+if [ ! -f $CONFIG_FILE ] ; then
+ CONFIG_FILE=/opt/csw/nagios/etc/nrpe.cfg
+fi
+BIN_FILE="/opt/csw/bin/nrpe"
+pidfile=`grep '^pid_file' $CONFIG_FILE |awk '{ FS = "=" } {print $2;}'`
+NRPE_USER=`awk -F'=' '/nrpe_user/ { print $NF }' $CONFIG_FILE`
+
+case "$1" in
+'restart')
+ [ -n "`pgrep -x -u 0,1,$NRPE_USER nrpe`" ] && /usr/bin/kill `head -1 $pidfile`
+ # remove pid file
+ if [ -f "$pidfile" ]; then
+ rm "$pidfile"
+ fi
+ if [ -f $CONFIG_FILE ]; then
+ wait 1
+ $BIN_FILE -c $CONFIG_FILE -d
+ fi
+ ;;
+
+'start')
+ if [ -f $CONFIG_FILE ]; then
+ $BIN_FILE -c $CONFIG_FILE -d
+ fi
+ ;;
+
+'stop')
+ [ -n "`pgrep -x -u 0,1,$NRPE_USER nrpe`" ] && /usr/bin/kill `head -1 $pidfile`
+ # remove pid file
+ if [ -f "$pidfile" ]; then
+ rm "$pidfile"
+ fi
+ ;;
+
+*)
+ echo "Usage: $0 { start | stop | restart }"
+ exit 1
+ ;;
+esac
+exit 0
Added: csw/mgar/pkg/nrpe/trunk/files/nrpe.xml
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/nrpe.xml (rev 0)
+++ csw/mgar/pkg/nrpe/trunk/files/nrpe.xml 2009-02-16 14:19:38 UTC (rev 3123)
@@ -0,0 +1,74 @@
+<?xml version='1.0'?>
+ <!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
+<!--
+
+ Alex Moore (blastwave.org) 01/06
+ Service manifest for NRPE
+ -->
+
+ <service_bundle type='manifest' name='nrpe:nrpe'>
+
+ <service
+ name='network/cswnrpe'
+ type='service'
+ version='1'>
+ <create_default_instance enabled='false' />
+ <single_instance />
+
+
+ <dependency name='fs'
+ grouping='require_all'
+ restart_on='none'
+ type='service'>
+ <service_fmri value='svc:/system/filesystem/local' />
+ </dependency>
+
+ <dependency
+ name='config-file'
+ grouping='require_any'
+ restart_on='refresh'
+ type='path'>
+ <service_fmri
+ value='file://localhost/opt/csw/nagios/etc/nrpe.cfg' />
+ </dependency>
+
+
+ <dependency name='net'
+ grouping='require_all'
+ restart_on='none'
+ type='service'>
+ <service_fmri value='svc:/network/loopback' />
+ </dependency>
+
+ <dependency name='network'
+ grouping='require_all'
+ restart_on='none'
+ type='service'>
+ <service_fmri value='svc:/network/service' />
+ </dependency>
+
+ <dependency name='syslog'
+ grouping='optional_all'
+ restart_on='none'
+ type='service'>
+ <service_fmri value='svc:/system/system-log' />
+ </dependency>
+
+ <exec_method
+ type='method'
+ name='start'
+ exec='/opt/csw/lib/svc/method/svc-nrpe start'
+ timeout_seconds='-1'>
+ </exec_method>
+
+ <exec_method
+ type='method'
+ name='stop'
+ exec='/opt/csw/lib/svc/method/svc-nrpe stop'
+ timeout_seconds='-1'>
+ </exec_method>
+
+
+ </service>
+
+ </service_bundle>
Added: csw/mgar/pkg/nrpe/trunk/files/patch.diff
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/patch.diff (rev 0)
+++ csw/mgar/pkg/nrpe/trunk/files/patch.diff 2009-02-16 14:19:38 UTC (rev 3123)
@@ -0,0 +1,16 @@
+diff --speed-large-files --minimal -Nru nrpe-2.12.orig/src/nrpe.c nrpe-2.12/src/nrpe.c
+--- nrpe-2.12.orig/src/nrpe.c 2008-03-10 22:04:43.000000000 +0100
++++ nrpe-2.12/src/nrpe.c 2008-12-15 14:31:43.737436594 +0100
+@@ -613,10 +613,10 @@
+ log_facility=LOG_UUCP;
+ else if(!strcmp(varvalue,"cron"))
+ log_facility=LOG_CRON;
+- else if(!strcmp(varvalue,"authpriv"))
++/* else if(!strcmp(varvalue,"authpriv"))
+ log_facility=LOG_AUTHPRIV;
+ else if(!strcmp(varvalue,"ftp"))
+- log_facility=LOG_FTP;
++ log_facility=LOG_FTP; */
+ else if(!strcmp(varvalue,"local0"))
+ log_facility=LOG_LOCAL0;
+ else if(!strcmp(varvalue,"local1"))
Added: csw/mgar/pkg/nrpe/trunk/files/svc-nrpe
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/svc-nrpe (rev 0)
+++ csw/mgar/pkg/nrpe/trunk/files/svc-nrpe 2009-02-16 14:19:38 UTC (rev 3123)
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# Copyright (c) 1992 - 2001 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#ident "@(#)nrpe 1.19 01/12/05 SMI"
+# Modified for CSW by Alex Moore 2005-12-03
+# 2007-08-18 Add pid file support.
+# 2007-08-19 Fix nagios uid used for pgrep. Thanks to Will McDonald for this.
+
+CONFIG_FILE=/etc/opt/csw/nrpe.cfg
+if [ ! -f $CONFIG_FILE ] ; then
+ CONFIG_FILE=/opt/csw/nagios/etc/nrpe.cfg
+fi
+BIN_FILE="/opt/csw/bin/nrpe"
+pidfile=`grep '^pid_file' $CONFIG_FILE |awk '{ FS = "=" } {print $2;}'`
+NRPE_USER=`awk -F'=' '/nrpe_user/ { print $NF }' $CONFIG_FILE`
+
+case "$1" in
+'restart')
+ [ -n "`pgrep -x -u 0,1,$NRPE_USER nrpe`" ] && /usr/bin/kill `head -1 $pidfile`
+ # remove pid file
+ if [ -f "$pidfile" ]; then
+ rm "$pidfile"
+ fi
+ if [ -f $CONFIG_FILE ]; then
+ wait 1
+ $BIN_FILE -c $CONFIG_FILE -d
+ fi
+ ;;
+
+'start')
+ if [ -f $CONFIG_FILE ]; then
+ $BIN_FILE -c $CONFIG_FILE -d
+ fi
+ ;;
+
+'stop')
+ [ -n "`pgrep -x -u 0,1,$NRPE_USER nrpe`" ] && /usr/bin/kill `head -1 $pidfile`
+ # remove pid file
+ if [ -f "$pidfile" ]; then
+ rm "$pidfile"
+ fi
+ ;;
+
+*)
+ echo "Usage: $0 { start | stop | restart }"
+ exit 1
+ ;;
+esac
+exit 0
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list