[csw-devel] SF.net SVN: gar:[3765] csw/mgar/pkg/nrpe/trunk

j_arndt at users.sourceforge.net j_arndt at users.sourceforge.net
Sat Mar 14 19:15:36 CET 2009


Revision: 3765
          http://gar.svn.sourceforge.net/gar/?rev=3765&view=rev
Author:   j_arndt
Date:     2009-03-14 18:15:35 +0000 (Sat, 14 Mar 2009)

Log Message:
-----------
nrpe: consolidated paths / permissions / ownerships, SMF via cswclassutils

Modified Paths:
--------------
    csw/mgar/pkg/nrpe/trunk/Makefile
    csw/mgar/pkg/nrpe/trunk/checksums
    csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.gspec
    csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.prototype

Added Paths:
-----------
    csw/mgar/pkg/nrpe/trunk/files/cswnrpe

Removed Paths:
-------------
    csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.depend
    csw/mgar/pkg/nrpe/trunk/files/CSWnrpeplugin.depend
    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/svc-nrpe

Modified: csw/mgar/pkg/nrpe/trunk/Makefile
===================================================================
--- csw/mgar/pkg/nrpe/trunk/Makefile	2009-03-14 17:02:52 UTC (rev 3764)
+++ csw/mgar/pkg/nrpe/trunk/Makefile	2009-03-14 18:15:35 UTC (rev 3765)
@@ -2,7 +2,7 @@
 GARVERSION = 2.12
 CATEGORIES = apps
 
-DESCRIPTION = NRPE daemon for Nagios
+DESCRIPTION = NRPE 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
@@ -10,13 +10,15 @@
 SF_PROJ = nagios
 MASTER_SITES = $(SF_MIRRORS)
 DISTFILES  = $(GARNAME)-$(GARVERSION).tar.gz
-DISTFILES += $(call admfiles,CSWnrpe, prototype checkinstall preinstall postinstall preremove )
-DISTFILES += svc-nrpe nrpe.xml nrpe
+DISTFILES += $(call admfiles,CSWnrpe, prototype checkinstall preinstall preremove )
+DISTFILES += cswnrpe
 DISTFILES += $(call admfiles,CSWnrpeplugin, prototype )
 
-REQUIRED_PKGS_CSWnrpe       = CSWosslrt CSWtcpwrap
-REQUIRED_PKGS_CSWnrpeplugin = CSWosslrt
+REQUIRED_PKGS_CSWnrpe       = CSWosslrt CSWtcpwrap CSWcswclassutils
+REQUIRED_PKGS_CSWnrpeplugin = CSWosslrt 
 
+SPKG_CLASSES = none cswinitsmf
+
 CONFIGURE_ARGS = $(DIRPATHS)
 CONFIGURE_ARGS += --with-ssl-lib=/opt/csw/lib
 CONFIGURE_ARGS += --with-ssl-inc=/opt/csw/include
@@ -30,7 +32,7 @@
 PATCHFILES += configure.diff 
 
 sysconfdir = $(prefix)/nagios/etc
-bindir = $(prefix)/bin
+bindir = $(prefix)/nagios/bin
 libexecdir = $(prefix)/libexec/nagios-plugins
 datadir = $(prefix)/share
 
@@ -57,4 +59,6 @@
 	ginstall -m 644 $(WORKSRC)/SECURITY $(DESTDIR)$(DOCDIR)
 	ginstall -m 775 -d $(DESTDIR)$(CFGDIR)
 	ginstall -m 644 $(WORKSRC)/sample-config/nrpe.cfg $(DESTDIR)$(CFGDIR)
+	ginstall -d $(DESTDIR)/etc/opt/csw/init.d
+	ginstall -m 755 $(FILEDIR)/cswnrpe $(DESTDIR)/etc/opt/csw/init.d/cswnrpe
 	@$(MAKECOOKIE)

Modified: csw/mgar/pkg/nrpe/trunk/checksums
===================================================================
--- csw/mgar/pkg/nrpe/trunk/checksums	2009-03-14 17:02:52 UTC (rev 3764)
+++ csw/mgar/pkg/nrpe/trunk/checksums	2009-03-14 18:15:35 UTC (rev 3765)
@@ -1,13 +1,10 @@
 b2d75e2962f1e3151ef58794d60c9e97  download/nrpe-2.12.tar.gz
-cc0aa5807e491e4ae15124da5aca4be1  download/CSWnrpe.gspec
-244f45e40f17aa98a0bb1a93ed7b9554  download/CSWnrpe.prototype
+92411c5c2fd596a0e1b5fd77f97bff4b  download/CSWnrpe.gspec
+4dd4b521ecafb3742bdbbdd7d6e84403  download/CSWnrpe.prototype
 bda68135e2b65da40c3d2b68a3b8dc78  download/CSWnrpe.checkinstall
 53eea7ed36535bb6cbe1d6fe0aae3508  download/CSWnrpe.preinstall
-71c9056ac6d0010a748745a405385d55  download/CSWnrpe.postinstall
 393872a95d2b9ec90363664c31074415  download/CSWnrpe.preremove
-ec1857a4400022e3eec874c34e2b7232  download/svc-nrpe
-1ee84a3e24cd4237bbb1fae59fc1d4ca  download/nrpe.xml
-ec1857a4400022e3eec874c34e2b7232  download/nrpe
+708c90700a7e1d79fe06e94a78fc1eea  download/cswnrpe
 54aebe8f3d7bc8d2ec5ea1954d859b10  download/CSWnrpeplugin.gspec
 e22a7817c7665e79bcbad7e091375be9  download/CSWnrpeplugin.prototype
 5b02d4385daaea2a8c13903539aa6189  download/patch.diff

Deleted: csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.depend
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.depend	2009-03-14 17:02:52 UTC (rev 3764)
+++ csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.depend	2009-03-14 18:15:35 UTC (rev 3765)
@@ -1,2 +0,0 @@
-P	CSWosslrt      openssl_rt - Openssl runtime libraries
-P	CSWtcpwrap     tcpwrappers - (ipv6.4 patched) lib and tools for pre-screening tcp connections

Modified: csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.gspec
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.gspec	2009-03-14 17:02:52 UTC (rev 3764)
+++ csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.gspec	2009-03-14 18:15:35 UTC (rev 3765)
@@ -2,8 +2,3 @@
 %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

Modified: csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.prototype
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.prototype	2009-03-14 17:02:52 UTC (rev 3764)
+++ csw/mgar/pkg/nrpe/trunk/files/CSWnrpe.prototype	2009-03-14 18:15:35 UTC (rev 3765)
@@ -1,11 +1,13 @@
-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/nagios/bin 0755 nagios nagios
+f none /opt/csw/nagios/bin/nrpe 0775 nagios nagios
+d none /opt/csw/nagios/etc 0755 nagios nagios
+f none /opt/csw/nagios/etc/nrpe.cfg 0644 nagios nagios
 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
+f cswinitsmf /etc/opt/csw/init.d/cswnrpe 0755 root bin
 i depend=CSWnrpe.depend
 i pkginfo=CSWnrpe.pkginfo

Deleted: csw/mgar/pkg/nrpe/trunk/files/CSWnrpeplugin.depend
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/CSWnrpeplugin.depend	2009-03-14 17:02:52 UTC (rev 3764)
+++ csw/mgar/pkg/nrpe/trunk/files/CSWnrpeplugin.depend	2009-03-14 18:15:35 UTC (rev 3765)
@@ -1 +0,0 @@
-P	CSWosslrt      openssl_rt - Openssl runtime libraries

Added: csw/mgar/pkg/nrpe/trunk/files/cswnrpe
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/cswnrpe	                        (rev 0)
+++ csw/mgar/pkg/nrpe/trunk/files/cswnrpe	2009-03-14 18:15:35 UTC (rev 3765)
@@ -0,0 +1,54 @@
+#!/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.
+# Modified for OpenCSW by Juergen Arndt 2009-03-14 
+
+#FMRI application       # FMRI path for service
+
+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/nagios/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

Deleted: csw/mgar/pkg/nrpe/trunk/files/doc.diff
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/doc.diff	2009-03-14 17:02:52 UTC (rev 3764)
+++ csw/mgar/pkg/nrpe/trunk/files/doc.diff	2009-03-14 18:15:35 UTC (rev 3765)
@@ -1,36 +0,0 @@
-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

Deleted: csw/mgar/pkg/nrpe/trunk/files/makefile.diff
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/makefile.diff	2009-03-14 17:02:52 UTC (rev 3764)
+++ csw/mgar/pkg/nrpe/trunk/files/makefile.diff	2009-03-14 18:15:35 UTC (rev 3765)
@@ -1,28 +0,0 @@
-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@

Deleted: csw/mgar/pkg/nrpe/trunk/files/nrpe
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/nrpe	2009-03-14 17:02:52 UTC (rev 3764)
+++ csw/mgar/pkg/nrpe/trunk/files/nrpe	2009-03-14 18:15:35 UTC (rev 3765)
@@ -1,51 +0,0 @@
-#!/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

Deleted: csw/mgar/pkg/nrpe/trunk/files/nrpe.xml
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/nrpe.xml	2009-03-14 17:02:52 UTC (rev 3764)
+++ csw/mgar/pkg/nrpe/trunk/files/nrpe.xml	2009-03-14 18:15:35 UTC (rev 3765)
@@ -1,74 +0,0 @@
-<?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>

Deleted: csw/mgar/pkg/nrpe/trunk/files/svc-nrpe
===================================================================
--- csw/mgar/pkg/nrpe/trunk/files/svc-nrpe	2009-03-14 17:02:52 UTC (rev 3764)
+++ csw/mgar/pkg/nrpe/trunk/files/svc-nrpe	2009-03-14 18:15:35 UTC (rev 3765)
@@ -1,51 +0,0 @@
-#!/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