diff options
author | brooks <brooks@FreeBSD.org> | 2011-10-20 04:34:16 +0800 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2011-10-20 04:34:16 +0800 |
commit | 2d5d16935fc737120eda763a1210b951aa80d214 (patch) | |
tree | a14a1cabda6fe1729990ad4ff137009d55cdd20a /sysutils | |
parent | 50ce088c3e1235b83ab87c9ae41d6055ed67eb0e (diff) | |
download | freebsd-ports-gnome-2d5d16935fc737120eda763a1210b951aa80d214.tar.gz freebsd-ports-gnome-2d5d16935fc737120eda763a1210b951aa80d214.tar.zst freebsd-ports-gnome-2d5d16935fc737120eda763a1210b951aa80d214.zip |
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.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/ganglia-monitor-core/Makefile | 4 | ||||
-rw-r--r-- | sysutils/ganglia-monitor-core/files/gmond.sh.in | 16 | ||||
-rw-r--r-- | sysutils/ganglia-monitor-core/files/patch-gmetad_Makefile.in | 14 |
3 files changed, 25 insertions, 9 deletions
diff --git a/sysutils/ganglia-monitor-core/Makefile b/sysutils/ganglia-monitor-core/Makefile index fa9a404a8e7f..99ed13da770b 100644 --- a/sysutils/ganglia-monitor-core/Makefile +++ b/sysutils/ganglia-monitor-core/Makefile @@ -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 diff --git a/sysutils/ganglia-monitor-core/files/gmond.sh.in b/sysutils/ganglia-monitor-core/files/gmond.sh.in index 44ba46ae767e..95e78ddefa65 100644 --- a/sysutils/ganglia-monitor-core/files/gmond.sh.in +++ b/sysutils/ganglia-monitor-core/files/gmond.sh.in @@ -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 $* diff --git a/sysutils/ganglia-monitor-core/files/patch-gmetad_Makefile.in b/sysutils/ganglia-monitor-core/files/patch-gmetad_Makefile.in new file mode 100644 index 000000000000..dcb7d57c3cd8 --- /dev/null +++ b/sysutils/ganglia-monitor-core/files/patch-gmetad_Makefile.in @@ -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: |