summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorhe <he@pkgsrc.org>2006-06-27 13:05:49 +0000
committerhe <he@pkgsrc.org>2006-06-27 13:05:49 +0000
commitbbd7a3d3a083a08fa9b1190fa2219ec83cd4ca59 (patch)
tree649feef0098aceec8061c703a02c0fcf7e0f0ff3 /sysutils
parent26bbfc7d8335c8ce4eff6ef2ac4a10648e628bc6 (diff)
downloadpkgsrc-bbd7a3d3a083a08fa9b1190fa2219ec83cd4ca59.tar.gz
Make sure /var/run/munin gets created on restart; /var/run is cleaned
out by NetBSD's rc.d scripts. Also make STATEDIR overridable. Bump revision to 2.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/munin-node/Makefile10
-rw-r--r--sysutils/munin-node/files/munin-node.sh8
2 files changed, 13 insertions, 5 deletions
diff --git a/sysutils/munin-node/Makefile b/sysutils/munin-node/Makefile
index 6ec2b76ff24..f691ae1cb1c 100644
--- a/sysutils/munin-node/Makefile
+++ b/sysutils/munin-node/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2006/06/09 13:22:44 he Exp $
+# $NetBSD: Makefile,v 1.5 2006/06/27 13:05:49 he Exp $
#
DISTNAME= munin_${VER}
@@ -6,7 +6,7 @@ VER= 1.3.1
PKGNAME= munin-node-${VER}
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=munin/}
-PKGREVISION= 1
+PKGREVISION= 2
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://munin.sourceforge.net/
@@ -28,7 +28,8 @@ MUNIN_USER?= munin
PKG_GROUPS= ${MUNIN_GROUP}
PKG_USERS= ${MUNIN_USER}:${MUNIN_GROUP}::Munin\\ user
-STATEDIR= ${VARBASE}/munin/plugin-state
+STATEDIR?= ${VARBASE}/munin/plugin-state
+MUNIN_RUN?= ${VARBASE}/run/munin
MAKE_DIRS= ${VARBASE}/munin
MAKE_DIRS+= ${VARBASE}/run/munin
@@ -57,6 +58,9 @@ MAKE_ENV+= PERL5=${PERL5:Q}
FILES_SUBST+= PERL=${PERL5:Q}
FILES_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
FILES_SUBST+= STATEDIR=${STATEDIR}
+FILES_SUBST+= MUNIN_RUN=${MUNIN_RUN:Q}
+FILES_SUBST+= MUNIN_USER=${MUNIN_USER:Q}
+FILES_SUBST+= MUNIN_GROUP=${MUNIN_GROUP:Q}
MESSAGE_SUBST+= VARBASE=${VARBASE:Q}
diff --git a/sysutils/munin-node/files/munin-node.sh b/sysutils/munin-node/files/munin-node.sh
index a95e7334da4..4aab73ce298 100644
--- a/sysutils/munin-node/files/munin-node.sh
+++ b/sysutils/munin-node/files/munin-node.sh
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# $NetBSD: munin-node.sh,v 1.1.1.1 2006/06/04 20:53:57 he Exp $
+# $NetBSD: munin-node.sh,v 1.2 2006/06/27 13:05:49 he Exp $
#
# PROVIDE: munin-node
# REQUIRE: DAEMON
@@ -24,7 +24,11 @@ required_files=@PKG_SYSCONFDIR@/munin/munin-node.conf
if [ ! -d @STATEDIR@ ]; then
mkdir @STATEDIR@
- chown munin:munin /var/run/munin
+ chown @MUNIN_USER@:@MUNIN_GROUP@ @STATEDIR@
+fi
+if [ ! -d @MUNIN_RUN@ ]; then
+ mkdir @MUNIN_RUN@
+ chown @MUNIN_USER@:@MUNIN_GROUP@ @MUNIN_RUN@
fi
if [ -f /etc/rc.subr ]; then