1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-30 01:15:52 +00:00

Fix a bug where the install target was overwriting gmetad.conf due to

code in the source tree.

Refactor the gmond rc.d script to allow multiple gmond daemons to be run
by making links to the script.  For example a link to gmond-cluster
would let you set gmond_cluster_enable and gmond_cluster_conf variables
to control a second instance.
This commit is contained in:
Brooks Davis 2011-10-19 20:34:16 +00:00
parent 85743a9763
commit 131325af8e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=283939
3 changed files with 25 additions and 9 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= monitor-core
PORTVERSION= 3.1.7
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= sysutils net parallel
MASTER_SITES= SF/ganglia/ganglia%20monitoring%20core/${PORTVERSION}
PKGNAMEPREFIX= ganglia-
@ -33,7 +33,7 @@ LIBTOOLFILES= configure libmetrics/configure
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --enable-setuid=ganglia --enable-setgid=ganglia
CONFIGURE_ENV= GANGLIA_ACK_SYSCONFDIR=1
CONFIGURE_ENV= GANGLIA_ACK_SYSCONFDIR=1 "LDFLAGS=${LDFLAGS}"
CFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib

View File

@ -5,21 +5,23 @@
# REQUIRE: DAEMON
# KEYWORD: shutdown
bname=`basename $0`
. /etc/rc.subr
name=gmond
name=`echo "${bname}" | tr ".-" "__"`
rcvar=`set_rcvar`
command="%%PREFIX%%/sbin/${name}"
command="%%PREFIX%%/sbin/gmond"
load_rc_config ganglia
load_rc_config $name
load_rc_config $bname
gmond_enable=${gmond_enable-NO}
gmond_conf=${gmond_conf-%%PREFIX%%/etc/gmond.conf}
eval "${name}_enable=\${${name}_enable-NO}"
eval "conffile=\${${name}_conf-%%PREFIX%%/etc/${bname}.conf}"
command_args="-c ${gmond_conf}"
required_files=${gmond_conf}
pidfile="/var/run/${bname}.pid"
command_args="-c ${conffile} -p ${pidfile}"
required_files=${conffile}
run_rc_command $*

View File

@ -0,0 +1,14 @@
$FreeBSD$
--- gmetad/Makefile.in.orig
+++ gmetad/Makefile.in
@@ -539,8 +539,6 @@
$(FIXCONFIG) gmetad.conf.in
install-data-hook: gmetad.conf
- mkdir -p $(DESTDIR)$(sysconfdir) && \
- $(INSTALL_DATA) gmetad.conf $(DESTDIR)$(sysconfdir)/gmetad.conf
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: