Skip to content

Commit

Permalink
Partially backport r2057, some Solaris artefacts
Browse files Browse the repository at this point in the history
  • Loading branch information
dpocock committed Jan 14, 2010
1 parent 1e97820 commit 99ea662
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
2 changes: 2 additions & 0 deletions configure.in
Expand Up @@ -735,13 +735,15 @@ esac

AC_OUTPUT(Makefile
ganglia-config
contrib/ganglia_gmond.xml
tests/Makefile
ganglia.spec
gmetad/Makefile
lib/default_conf.h
lib/Makefile
gmond/Makefile
gstat/Makefile
gmond/gmond.solaris.init
gmond/modules/Makefile
gmond/modules/conf.d/modpython.conf
gmond/modules/example/Makefile
Expand Down
6 changes: 3 additions & 3 deletions contrib/ganglia_gmond.xml → contrib/ganglia_gmond.xml.in
@@ -1,7 +1,7 @@
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='manifest' name='gmond'>
<service name='application/ganglia/gmond' type='service' version='1'>
<service name='ganglia/gmond' type='service' version='1'>

<dependency name='fs' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local'/>
Expand All @@ -10,10 +10,10 @@
<service_fmri value='svc:/network/physical:default'/>
</dependency>
<dependency name='config' grouping='require_all' restart_on='none' type='path'>
<service_fmri value='file://localhost/etc/gmond.conf'/>
<service_fmri value='file://localhost@prefix@/etc/gmond.conf'/>
</dependency>

<exec_method name='start' type='method' exec='/opt/ganglia/sbin/gmond' timeout_seconds='60'/>
<exec_method name='start' type='method' exec='@prefix@/sbin/gmond' timeout_seconds='60'/>
<exec_method name='stop' type='method' exec=':kill' timeout_seconds='60' />

<instance name="default" enabled="true">
Expand Down
27 changes: 27 additions & 0 deletions gmond/gmond.solaris.init.in
@@ -0,0 +1,27 @@
#!/bin/sh

GANGLIA_BASEDIR=@prefix@
GMOND=${GANGLIA_BASEDIR}/sbin/gmond

test -f /etc/default/gmond && . /etc/default/gmond

[ ! -d ${GANGLIA_BASEDIR} ] && exit 1

case "$1" in

'start')
${GMOND}
;;

'stop')
/usr/bin/pkill -x gmond
;;

*)
echo "Usage: $0 { start | stop }"
exit 1
;;

esac
exit 0

0 comments on commit 99ea662

Please sign in to comment.