From fa97e70515f35be838b1eb7fbee7db5dca28d102 Mon Sep 17 00:00:00 2001 From: joerg Date: Sun, 16 Sep 2007 10:29:52 +0000 Subject: Rename RC scripts and use common infrastructure handling instead of doing it manually. --- parallel/ganglia-monitor-core/files/gmetad.in | 45 --------------------------- parallel/ganglia-monitor-core/files/gmetad.sh | 45 +++++++++++++++++++++++++++ parallel/ganglia-monitor-core/files/gmond.in | 42 ------------------------- parallel/ganglia-monitor-core/files/gmond.sh | 42 +++++++++++++++++++++++++ 4 files changed, 87 insertions(+), 87 deletions(-) delete mode 100644 parallel/ganglia-monitor-core/files/gmetad.in create mode 100644 parallel/ganglia-monitor-core/files/gmetad.sh delete mode 100644 parallel/ganglia-monitor-core/files/gmond.in create mode 100644 parallel/ganglia-monitor-core/files/gmond.sh (limited to 'parallel/ganglia-monitor-core/files') diff --git a/parallel/ganglia-monitor-core/files/gmetad.in b/parallel/ganglia-monitor-core/files/gmetad.in deleted file mode 100644 index acf02457583..00000000000 --- a/parallel/ganglia-monitor-core/files/gmetad.in +++ /dev/null @@ -1,45 +0,0 @@ -#!@RCD_SCRIPTS_SHELL@ -# -# $NetBSD: gmetad.in,v 1.1.1.1 2005/02/07 14:33:22 jschauma Exp $ -# -# PROVIDE: gmetad -# REQUIRE: DAEMON -# KEYWORD: shutdown -# -# You will need to set some variables in /etc/rc.conf to start gmetad: -# -# gmetad=YES - -if [ -f /etc/rc.subr ] -then - . /etc/rc.subr -fi - -name="gmetad" -rcvar=$name -command="@PREFIX@/sbin/gmetad" -required_files="@PKG_SYSCONFDIR@/gmetad.conf" -start_cmd="gmetad_start" -stop_cmd="gmetad_stop" -restart_cmd="gmetad_stop ; gmetad_start" - -gmetad_start () -{ - # gmetad/process_xml.c 1060 re-releases a lock, claiming it's - # ``required under certain errors'' - export PTHREAD_DIAGASSERT=A - ${command} -} - -gmetad_stop() -{ - pkill ${name} 2>/dev/null -} - -if [ -f /etc/rc.subr -a -f /etc/rc.conf -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ] -then - load_rc_config $name - run_rc_command "$1" -else - eval ${start_cmd} -fi diff --git a/parallel/ganglia-monitor-core/files/gmetad.sh b/parallel/ganglia-monitor-core/files/gmetad.sh new file mode 100644 index 00000000000..edb9df2b2de --- /dev/null +++ b/parallel/ganglia-monitor-core/files/gmetad.sh @@ -0,0 +1,45 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: gmetad.sh,v 1.1 2007/09/16 10:29:53 joerg Exp $ +# +# PROVIDE: gmetad +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# You will need to set some variables in /etc/rc.conf to start gmetad: +# +# gmetad=YES + +if [ -f /etc/rc.subr ] +then + . /etc/rc.subr +fi + +name="gmetad" +rcvar=$name +command="@PREFIX@/sbin/gmetad" +required_files="@PKG_SYSCONFDIR@/gmetad.conf" +start_cmd="gmetad_start" +stop_cmd="gmetad_stop" +restart_cmd="gmetad_stop ; gmetad_start" + +gmetad_start () +{ + # gmetad/process_xml.c 1060 re-releases a lock, claiming it's + # ``required under certain errors'' + export PTHREAD_DIAGASSERT=A + ${command} +} + +gmetad_stop() +{ + pkill ${name} 2>/dev/null +} + +if [ -f /etc/rc.subr -a -f /etc/rc.conf -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ] +then + load_rc_config $name + run_rc_command "$1" +else + eval ${start_cmd} +fi diff --git a/parallel/ganglia-monitor-core/files/gmond.in b/parallel/ganglia-monitor-core/files/gmond.in deleted file mode 100644 index 978173c74bd..00000000000 --- a/parallel/ganglia-monitor-core/files/gmond.in +++ /dev/null @@ -1,42 +0,0 @@ -#!@RCD_SCRIPTS_SHELL@ -# -# $NetBSD: gmond.in,v 1.1.1.1 2005/02/07 14:33:22 jschauma Exp $ -# -# PROVIDE: gmond -# REQUIRE: DAEMON -# KEYWORD: shutdown -# -# You will need to set some variables in /etc/rc.conf to start gmond: -# -# gmond=YES - -if [ -f /etc/rc.subr ] -then - . /etc/rc.subr -fi - -name="gmond" -rcvar=$name -command="@PREFIX@/sbin/gmond" -required_files="@PKG_SYSCONFDIR@/gmond.conf" -start_cmd="gmond_start" -stop_cmd="gmond_stop" -restart_cmd="gmond_stop ; gmond_start" - -gmond_start () -{ - ${command} -} - -gmond_stop() -{ - pkill ${name} 2>/dev/null -} - -if [ -f /etc/rc.subr -a -f /etc/rc.conf -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ] -then - load_rc_config $name - run_rc_command "$1" -else - eval ${start_cmd} -fi diff --git a/parallel/ganglia-monitor-core/files/gmond.sh b/parallel/ganglia-monitor-core/files/gmond.sh new file mode 100644 index 00000000000..c3bbfff489f --- /dev/null +++ b/parallel/ganglia-monitor-core/files/gmond.sh @@ -0,0 +1,42 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: gmond.sh,v 1.1 2007/09/16 10:29:53 joerg Exp $ +# +# PROVIDE: gmond +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# You will need to set some variables in /etc/rc.conf to start gmond: +# +# gmond=YES + +if [ -f /etc/rc.subr ] +then + . /etc/rc.subr +fi + +name="gmond" +rcvar=$name +command="@PREFIX@/sbin/gmond" +required_files="@PKG_SYSCONFDIR@/gmond.conf" +start_cmd="gmond_start" +stop_cmd="gmond_stop" +restart_cmd="gmond_stop ; gmond_start" + +gmond_start () +{ + ${command} +} + +gmond_stop() +{ + pkill ${name} 2>/dev/null +} + +if [ -f /etc/rc.subr -a -f /etc/rc.conf -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ] +then + load_rc_config $name + run_rc_command "$1" +else + eval ${start_cmd} +fi -- cgit v1.2.3