From 4cc1f10068b663bc8f474fed7a28d95fb6c40f7d Mon Sep 17 00:00:00 2001 From: he Date: Tue, 27 Jun 2006 13:05:49 +0000 Subject: 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. --- sysutils/munin-node/Makefile | 10 +++++++--- sysutils/munin-node/files/munin-node.sh | 8 ++++++-- 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 -- cgit v1.2.3