[csw-devel] SF.net SVN: gar:[3892] csw/mgar/pkg/pnp/trunk

j_arndt at users.sourceforge.net j_arndt at users.sourceforge.net
Mon Mar 23 23:20:28 CET 2009


Revision: 3892
          http://gar.svn.sourceforge.net/gar/?rev=3892&view=rev
Author:   j_arndt
Date:     2009-03-23 22:20:28 +0000 (Mon, 23 Mar 2009)

Log Message:
-----------
pnp: path relayout, added cswpreserveconf, small changes to start script

Modified Paths:
--------------
    csw/mgar/pkg/pnp/trunk/Makefile
    csw/mgar/pkg/pnp/trunk/checksums
    csw/mgar/pkg/pnp/trunk/files/CSWpnp.prototype
    csw/mgar/pkg/pnp/trunk/files/cswpnp

Modified: csw/mgar/pkg/pnp/trunk/Makefile
===================================================================
--- csw/mgar/pkg/pnp/trunk/Makefile	2009-03-23 20:17:53 UTC (rev 3891)
+++ csw/mgar/pkg/pnp/trunk/Makefile	2009-03-23 22:20:28 UTC (rev 3892)
@@ -2,7 +2,7 @@
 GARVERSION = 0.4.13
 CATEGORIES = apps
 
-DESCRIPTION = Analyzing Nagios performance data with RRD databases.
+DESCRIPTION = analyzing nagios performance data with RRD databases.
 define BLURB
   PNP is an addon to nagios which analyzes performance data provided by plugins and stores them automatically into RRD-databases
 endef
@@ -28,22 +28,22 @@
 LIBS += -lucb
 
 datadir = /opt/csw/nagios/share/pnp
-sysconfdir = $(prefix)/nagios/etc/pnp
+sysconfdir = $(prefix)/nagios/pnp/etc
 bindir = $(prefix)/nagios/bin
 libexecdir = $(prefix)/libexec/nagios-plugins
 
 REQUIRED_PKGS_sparc = SUNWscpux
 REQUIRED_PKGS_i386 = SUNWscpu
 REQUIRED_PKGS = CSWphp5 CSWphp5gd CSWap2modphp5 CSWrrd $(REQUIRED_PKGS_$(GARCH)) CSWcswclassutils
-SPKG_CLASSES = none cswinitsmf
+SPKG_CLASSES = none cswpreserveconf cswinitsmf
 
-PROTOTYPE_FILTER  = awk '$$$$3 ~ /\/init.d\/cswpnp$$$$/ { $$$$2 = "cswinitsmf" } { print }'
+#PROTOTYPE_FILTER  = awk '$$$$3 ~ /\/init.d\/cswpnp$$$$/ { $$$$2 = "cswinitsmf" } { print }'
 
 CONFIGURE_ARGS = $(DIRPATHS)
 CONFIGURE_ARGS += --with-perl_lib_path=/opt/csw/lib/perl/csw
-CONFIGURE_ARGS += --with-perfdata-logfile=/opt/csw/nagios/var/perfdata.log
-CONFIGURE_ARGS += --with-perfdata-dir=/opt/csw/nagios/share/perfdata
-CONFIGURE_ARGS += --with-perfdata-spool-dir=/opt/csw/var/spool/perfdata
+CONFIGURE_ARGS += --with-perfdata-logfile=/opt/csw/nagios/pnp/var/perfdata.log
+CONFIGURE_ARGS += --with-perfdata-dir=/opt/csw/nagios/pnp/share/perfdata
+CONFIGURE_ARGS += --with-perfdata-spool-dir=/opt/csw/nagios/pnp/var/spool/perfdata
 CONFIGURE_ARGS += --htmldir=/opt/csw/nagios/share/pnp
 
 BUILD_ARGS = all
@@ -62,22 +62,22 @@
 SYSCONFDIR = $(sysconfdir)
 LIBEXECDIR = $(libexecdir)
 BINDIR = $(bindir)
-PERFDATA_SPOOL_DIR=/opt/csw/nagios/var/spool/perfdata/
-PERFDATADIR = /opt/csw/nagios/share/perfdata
+PERFDATA_SPOOL_DIR=/opt/csw/nagios/pnp/var/spool/perfdata/
+PERFDATADIR = /opt/csw/nagios/pnp/share/perfdata
 
 install-base-custom:
-	@echo "$(GARCH)"
-	@echo "$(GARCH)"
-	@echo "$(GARCH)"
 	@ginstall -m 755 -d $(DESTDIR)$(BINDIR)
 	@ginstall -m 755 -d $(DESTDIR)$(PERFDATA_SPOOL_DIR)
 	@ginstall -m 754 $(WORKSRC)/src/npcd $(DESTDIR)$(BINDIR)
 	@ginstall -m 754 $(WORKSRC)/src/npcdmod $(DESTDIR)$(BINDIR)
 	@ginstall -d $(DESTDIR)/etc/opt/csw/init.d
 	@ginstall -m 755 $(FILEDIR)/cswpnp $(DESTDIR)/etc/opt/csw/init.d/cswpnp
+	@$(MAKECOOKIE)
 
 install-html-custom:
 	@ginstall -m 755  -d $(DESTDIR)$(DATAROOTDIR)
+	@ginstall -m 755 -d $(DESTDIR)/opt/csw/nagios/pnp/share
+	@ln -s $(DESTDIR)$(DATAROOTDIR) $(DESTDIR)/opt/csw/nagios/pnp/share/html
 	@ginstall -m 755  -d $(DESTDIR)$(DATAROOTDIR)/images
 	@ginstall -m 755  -d $(DESTDIR)$(DATAROOTDIR)/include
 	@ginstall -m 755  -d $(DESTDIR)$(DATAROOTDIR)/include/font
@@ -105,12 +105,14 @@
 	do ginstall -m 644  $$file $(DESTDIR)$(DATAROOTDIR)/include/font; done
 	for file in $(WORKSRC)/share/pnp/include/font/makefont/*; \
 	do ginstall -m 644  $$file $(DESTDIR)$(DATAROOTDIR)/include/font/makefont; done
+	@$(MAKECOOKIE)
 
 install-scripts-custom:
 	@ginstall -m 755  -d $(DESTDIR)$(PERFDATADIR)
 	@ginstall -m 755  -d $(DESTDIR)$(LIBEXECDIR)
 	@ginstall -m 755  $(WORKSRC)/scripts/process_perfdata.pl $(DESTDIR)$(LIBEXECDIR)
 	#@ginstall -m 755  $(WORKSRC)/scripts/pcheck_pnp_rrds.pl $(DESTDIR)$(LIBEXECDIR)
+	@$(MAKECOOKIE)
 
 install-config-custom:
 	-rm -f $(DESTDIR)$(HTMLDIR)/conf/config.php
@@ -125,11 +127,12 @@
 	@ginstall -m 755  -d $(DESTDIR)$(SYSCONFDIR)/check_commands
 	@ginstall -m 755  -d $(DESTDIR)$(SYSCONFDIR)/pages
 	@ginstall -m 644   $(WORKSRC)/sample-config/pnp/config.php $(DESTDIR)$(SYSCONFDIR)
-	@ginstall -m 644   $(WORKSRC)/sample-config/pnp/process_perfdata.cfg-sample $(DESTDIR)$(SYSCONFDIR)
-	@ginstall -m 644   $(WORKSRC)/sample-config/pnp/rra.cfg-sample $(DESTDIR)$(SYSCONFDIR)
-	@ginstall -m 644   $(WORKSRC)/sample-config/pnp/check_commands/check_nwstat.cfg-sample $(DESTDIR)$(SYSCONFDIR)/check_commands
-	@ginstall -m 644   $(WORKSRC)/sample-config/pnp/pages/web_traffic.cfg-sample $(DESTDIR)$(SYSCONFDIR)/pages
-	@ginstall -m 644   $(WORKSRC)/sample-config/pnp/npcd.cfg-sample $(DESTDIR)$(SYSCONFDIR)/npcd.cfg
+	@ginstall -m 644   $(WORKSRC)/sample-config/pnp/process_perfdata.cfg-sample $(DESTDIR)$(SYSCONFDIR)/process_perfdata.cfg.CSW
+	@ginstall -m 644   $(WORKSRC)/sample-config/pnp/rra.cfg-sample $(DESTDIR)$(SYSCONFDIR)/rra.cfg.CSW
+	@ginstall -m 644   $(WORKSRC)/sample-config/pnp/check_commands/check_nwstat.cfg-sample $(DESTDIR)$(SYSCONFDIR)/check_commands/check_nwstat.cfg.CSW
+	@ginstall -m 644   $(WORKSRC)/sample-config/pnp/pages/web_traffic.cfg-sample $(DESTDIR)$(SYSCONFDIR)/pages/web_traffic.cfg.CSW
+	@ginstall -m 644   $(WORKSRC)/sample-config/pnp/npcd.cfg-sample $(DESTDIR)$(SYSCONFDIR)/npcd.cfg.CSW
+	@$(MAKECOOKIE)
 
 install-contrib-custom:
 	@ginstall -m 755  -d $(DESTDIR)$(CONTRIBDIR)
@@ -138,3 +141,4 @@
 	@ginstall -m 644 $(WORKSRC)/contrib/verify_pnp_config $(DESTDIR)$(CONTRIBDIR)
 	@ginstall -m 644 $(WORKSRC)/contrib/verify_pnp_config.txt $(DESTDIR)$(CONTRIBDIR)
 	@ginstall -m 644 $(WORKSRC)/contrib/ssi/status-header.ssi $(DESTDIR)$(CONTRIBDIR)/ssi
+	@$(MAKECOOKIE)

Modified: csw/mgar/pkg/pnp/trunk/checksums
===================================================================
--- csw/mgar/pkg/pnp/trunk/checksums	2009-03-23 20:17:53 UTC (rev 3891)
+++ csw/mgar/pkg/pnp/trunk/checksums	2009-03-23 22:20:28 UTC (rev 3892)
@@ -1,5 +1,6 @@
 20a96f81edba29dcd21215bde4af8b57  download/pnp-0.4.13.tar.gz
 216b8ed50919642c3fae2a6520724dd3  download/CSWpnp.gspec
-e96576b61cabf446d0d38bd19a45b2b8  download/CSWpnp.prototype
+c3cee9b1ce8286d553735d2bbde151e0  download/CSWpnp.prototype
+2ee8cb45d9bf3c11ec80299ef5e2b436  download/cswpnp
 30e8699531bb0249542b3012a00a73b1  download/makefile.diff
 b1229d599c2ce12c3aacf0a44e1588d6  download/npcd.diff

Modified: csw/mgar/pkg/pnp/trunk/files/CSWpnp.prototype
===================================================================
--- csw/mgar/pkg/pnp/trunk/files/CSWpnp.prototype	2009-03-23 20:17:53 UTC (rev 3891)
+++ csw/mgar/pkg/pnp/trunk/files/CSWpnp.prototype	2009-03-23 22:20:28 UTC (rev 3892)
@@ -1,3 +1,8 @@
+d none /etc/opt/csw/init.d 0755 root bin
+f cswinitsmf /etc/opt/csw/init.d/cswpnp 0755 root bin
+d none /opt/csw/libexec 0755 root bin
+d none /opt/csw/libexec/nagios-plugins 0755 root bin
+f none /opt/csw/libexec/nagios-plugins/process_perfdata.pl 0755 root bin
 d none /opt/csw/nagios 0755 root bin
 d none /opt/csw/nagios/bin 0755 nagios nagios
 f none /opt/csw/nagios/bin/npcd 0754 nagios nagios
@@ -2,19 +7,29 @@
 f none /opt/csw/nagios/bin/npcdmod 0754 nagios nagios
-d none /opt/csw/nagios/etc/pnp 0755 nagios nagios
-f none /opt/csw/nagios/etc/pnp/background.pdf 0644 nagios nagios
-d none /opt/csw/nagios/etc/pnp/check_commands 0755 nagios nagios
-f none /opt/csw/nagios/etc/pnp/check_commands/check_nwstat.cfg-sample 0644 nagios nagios
-f none /opt/csw/nagios/etc/pnp/config.php 0644 nagios nagios
-f none /opt/csw/nagios/etc/pnp/npcd.cfg 0644 nagios nagios
-d none /opt/csw/nagios/etc/pnp/pages 0755 nagios nagios
-f none /opt/csw/nagios/etc/pnp/pages/web_traffic.cfg-sample 0644 nagios nagios
-f none /opt/csw/nagios/etc/pnp/pnp4nagios_release 0644 nagios nagios
-f none /opt/csw/nagios/etc/pnp/process_perfdata.cfg-sample 0644 nagios nagios
-f none /opt/csw/nagios/etc/pnp/rra.cfg-sample 0644 nagios nagios
-d none /opt/csw/libexec/nagios-plugins 0755 root bin
-f none /opt/csw/libexec/nagios-plugins/process_perfdata.pl 0755 root bin
+d none /opt/csw/nagios/pnp 0755 nagios nagios
+d none /opt/csw/nagios/pnp/etc 0755 nagios nagios
+f none /opt/csw/nagios/pnp/etc/background.pdf 0644 nagios nagios
+d none /opt/csw/nagios/pnp/etc/check_commands 0755 nagios nagios
+f cswpreserveconf /opt/csw/nagios/pnp/etc/check_commands/check_nwstat.cfg.CSW 0644 nagios nagios
+f none /opt/csw/nagios/pnp/etc/config.php 0644 nagios nagios
+f cswpreserveconf /opt/csw/nagios/pnp/etc/npcd.cfg.CSW 0644 nagios nagios
+d none /opt/csw/nagios/pnp/etc/pages 0755 nagios nagios
+f cswpreserveconf /opt/csw/nagios/pnp/etc/pages/web_traffic.cfg.CSW 0644 nagios nagios
+f none /opt/csw/nagios/pnp/etc/pnp4nagios_release 0644 nagios nagios
+f cswpreserveconf /opt/csw/nagios/pnp/etc/process_perfdata.cfg.CSW 0644 nagios nagios
+f cswpreserveconf /opt/csw/nagios/pnp/etc/rra.cfg.CSW 0644 nagios nagios
+d none /opt/csw/nagios/pnp/share 0755 nagios nagios
+d none /opt/csw/nagios/pnp/share/perfdata 0755 nagios nagios
+d none /opt/csw/nagios/pnp/var 0755 nagios nagios
+d none /opt/csw/nagios/pnp/var/spool 0755 nagios nagios
+d none /opt/csw/nagios/pnp/var/spool/perfdata 0755 nagios nagios
 d none /opt/csw/nagios/share 0755 nagios nagios
-d none /opt/csw/nagios/share/perfdata 0755 nagios nagios
 d none /opt/csw/nagios/share/pnp 0755 nagios nagios
+s none /opt/csw/nagios/pnp/share/html=/opt/csw/nagios/share/pnp
 f none /opt/csw/nagios/share/pnp/ajax.php 0644 nagios nagios
+d none /opt/csw/nagios/share/pnp/contrib 0755 nagios nagios
+f none /opt/csw/nagios/share/pnp/contrib/makeserviceextinfo.pl 0644 nagios nagios
+d none /opt/csw/nagios/share/pnp/contrib/ssi 0755 nagios nagios
+f none /opt/csw/nagios/share/pnp/contrib/ssi/status-header.ssi 0644 nagios nagios
+f none /opt/csw/nagios/share/pnp/contrib/verify_pnp_config 0644 nagios nagios
+f none /opt/csw/nagios/share/pnp/contrib/verify_pnp_config.txt 0644 nagios nagios
 d none /opt/csw/nagios/share/pnp/images 0755 nagios nagios
@@ -155,13 +170,5 @@
 d none /opt/csw/nagios/share/pnp/templates.special 0755 nagios nagios
 f none /opt/csw/nagios/share/pnp/templates.special/loop.php 0644 nagios nagios
 f none /opt/csw/nagios/share/pnp/zoom.php 0644 nagios nagios
-d none /opt/csw/nagios/share/pnp/contrib 0755 nagios nagios
-d none /opt/csw/nagios/share/pnp/contrib/ssi 0755 nagios nagios
-f none /opt/csw/nagios/share/pnp/contrib/makeserviceextinfo.pl 0755 nagios nagios
-f none /opt/csw/nagios/share/pnp/contrib/verify_pnp_config 0755 nagios nagios
-f none /opt/csw/nagios/share/pnp/contrib/verify_pnp_config.txt 0644 nagios nagios
-f none /opt/csw/nagios/share/pnp/contrib/ssi/status-header.ssi 0644 nagios nagios
-d none /opt/csw/nagios/var 0755 nagios nagios
-d none /opt/csw/nagios/var/spool 0755 nagios nagios
-d none /opt/csw/nagios/var/spool/perfdata 0755 nagios nagios
-f cswinitsmf /etc/opt/csw/init.d/cswpnp 0755 root bin
+d none /opt/csw/share/doc/pnp 0755 nagios nagios
+f none /opt/csw/share/doc/pnp/license 0644 nagios nagios

Modified: csw/mgar/pkg/pnp/trunk/files/cswpnp
===================================================================
--- csw/mgar/pkg/pnp/trunk/files/cswpnp	2009-03-23 20:17:53 UTC (rev 3891)
+++ csw/mgar/pkg/pnp/trunk/files/cswpnp	2009-03-23 22:20:28 UTC (rev 3892)
@@ -7,12 +7,25 @@
 # 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.
-# 2009-03-08 Fix for "user = nagios" and awk
+# 2009-03-08 Fix for "user = nagios" and awk by Juergen Arndt
+# 2009-03-23 modifications for cswinitsmf by Juergen Arndt
 
-CONFIG_FILE=/etc/opt/csw/pnp.cfg
-if [ ! -f $CONFIG_FILE ] ; then
-    CONFIG_FILE=/opt/csw/nagios/etc/pnp/npcd.cfg
+#FMRI application       # FMRI path for service, see http://wiki.opencsw.org/cswclassutils-package#toc0
+
+SMF_EXIT_ERR_CONFIG=1
+
+if [ -f /lib/svc/share/smf_include.sh ]
+then
+	. /lib/svc/share/smf_include.sh
 fi
+
+CONFIG_FILE=/opt/csw/nagios/pnp/etc/npcd.cfg
+
+if [ ! -f $CONFIG_FILE ]
+then
+	exit $SMF_EXIT_ERR_CONFIG
+fi
+
 BIN_FILE="/opt/csw/nagios/bin/npcd"
 pidfile=`grep '^pid_file' $CONFIG_FILE |awk '{ FS = "=" } {print $2;}'`
 PNP_USER=`awk '/^user/ { print $NF }' $CONFIG_FILE`


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