[csw-devel] SF.net SVN: gar:[6189] csw/mgar/pkg/ganglia/trunk

d_pocock at users.sourceforge.net d_pocock at users.sourceforge.net
Sat Sep 5 01:21:50 CEST 2009


Revision: 6189
          http://gar.svn.sourceforge.net/gar/?rev=6189&view=rev
Author:   d_pocock
Date:     2009-09-04 23:21:50 +0000 (Fri, 04 Sep 2009)

Log Message:
-----------
ganglia: init.d script and SMF support

Modified Paths:
--------------
    csw/mgar/pkg/ganglia/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/ganglia/trunk/files/cswgmetad
    csw/mgar/pkg/ganglia/trunk/files/cswgmond

Modified: csw/mgar/pkg/ganglia/trunk/Makefile
===================================================================
--- csw/mgar/pkg/ganglia/trunk/Makefile	2009-09-04 21:34:22 UTC (rev 6188)
+++ csw/mgar/pkg/ganglia/trunk/Makefile	2009-09-04 23:21:50 UTC (rev 6189)
@@ -22,7 +22,7 @@
 MASTER_SITES = $(SF_MIRRORS)
 DISTFILES  = $(GARNAME)-$(GARVERSION).tar.gz
 DISTFILES += CSWgangliaweb.postinstall CSWgangliaweb.preremove
-DISTFILES += httpd-ganglia.conf.CSW
+DISTFILES += httpd-ganglia.conf.CSW cswgmond cswgmetad
 
 PACKAGES = CSWgangliaagent CSWgangliart CSWgangliadevel CSWgangliagmetad CSWgangliaweb CSWgangliamodpython
 
@@ -105,11 +105,16 @@
 PKGFILES_CSWgangliart = $(libdir)/libganglia.*
 PKGFILES_CSWgangliamodpython = .*python.*
 PKGFILES_CSWgangliadevel = .*/include/.*.h .*/bin/ganglia-config
-PKGFILES_CSWgangliagmetad = .*/gmetad.* /opt/csw/var/ganglia/rrds
+PKGFILES_CSWgangliagmetad = .*/gmetad.* /opt/csw/var/ganglia/rrds /etc/opt/csw/init.d/cswgmetad
 PKGFILES_CSWgangliaweb = $(WWWGANGLIA)/.* /opt/csw/apache2/etc/extra/.*
 
 PRESERVECONF = /opt/csw/apache2/etc/extra/httpd-ganglia.conf.CSW
 
+# For gmond
+INITSMF = /etc/opt/csw/init.d/cswgmond
+# For gmetad
+INITSMF += /etc/opt/csw/init.d/cswgmetad
+
 PROTOTYPE_FILTER_CSWgangliagmetad = awk '\
 $$$$3 ~ /\/opt\/csw\/var\/ganglia\/rrds/ { $$$$5 = "nobody"; $$$$6 = "nogroup" } \
 { print }'
@@ -121,6 +126,10 @@
 include gar/category.mk
 
 install-custom:
+	@ginstall -D $(DOWNLOADDIR)/cswgmond \
+		$(PKGROOT)/etc/opt/csw/init.d/cswgmond
+	@ginstall -D $(DOWNLOADDIR)/cswgmetad \
+		$(PKGROOT)/etc/opt/csw/init.d/cswgmetad
 	@ginstall -d $(DESTDIR)$(WWWGANGLIA)
 	@cd $(WORKSRC)/web; \
 		cp -R * $(DESTDIR)$(WWWGANGLIA)

Added: csw/mgar/pkg/ganglia/trunk/files/cswgmetad
===================================================================
--- csw/mgar/pkg/ganglia/trunk/files/cswgmetad	                        (rev 0)
+++ csw/mgar/pkg/ganglia/trunk/files/cswgmetad	2009-09-04 23:21:50 UTC (rev 6189)
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+GANGLIA_BASEDIR=/opt/csw
+GMETAD=${GANGLIA_BASEDIR}/sbin/gmetad
+GMETAD_CONF=/etc/opt/csw/ganglia/gmetad.conf
+
+test -f /etc/default/gmetad && . /etc/default/gmetad
+
+[ ! -d ${GANGLIA_BASEDIR} ] && exit 1
+
+case "$1" in
+
+    'start')
+        ${GMETAD} -c "${GMETAD_CONF}"
+        ;;
+
+    'stop')
+        /usr/bin/pkill -x gmetad
+        ;;
+
+    *)
+        echo "Usage: $0 { start | stop }"
+        exit 1
+        ;;
+
+esac
+exit 0
+
+

Added: csw/mgar/pkg/ganglia/trunk/files/cswgmond
===================================================================
--- csw/mgar/pkg/ganglia/trunk/files/cswgmond	                        (rev 0)
+++ csw/mgar/pkg/ganglia/trunk/files/cswgmond	2009-09-04 23:21:50 UTC (rev 6189)
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+GANGLIA_BASEDIR=/opt/csw
+GMOND=${GANGLIA_BASEDIR}/sbin/gmond
+GMOND_CONF=/etc/opt/csw/ganglia/gmond.conf
+
+test -f /etc/default/gmond && . /etc/default/gmond
+
+[ ! -d ${GANGLIA_BASEDIR} ] && exit 1
+
+case "$1" in
+
+    'start')
+        ${GMOND} -c "${GMOND_CONF}"
+        ;;
+
+    'stop')
+        /usr/bin/pkill -x gmond
+        ;;
+
+    *)
+        echo "Usage: $0 { start | stop }"
+        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