summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorgdt <gdt@pkgsrc.org>2008-06-20 15:28:11 +0000
committergdt <gdt@pkgsrc.org>2008-06-20 15:28:11 +0000
commitd6202db229dd279a3a508f08a0d0ae5b24643e0f (patch)
treec186887ffc8e3efc840cf40838a9fee7ba1d4104 /net
parent41af30e8dfec8aee51616e131f2f6f12e858387b (diff)
downloadpkgsrc-d6202db229dd279a3a508f08a0d0ae5b24643e0f.tar.gz
Substitute nagios user rather than hardcode it. Note that the config
file must set the lockfile location, and leave a comment that this should be merged into the package.
Diffstat (limited to 'net')
-rw-r--r--net/nagios-base/Makefile10
-rw-r--r--net/nagios-base/files/nagios.sh4
2 files changed, 10 insertions, 4 deletions
diff --git a/net/nagios-base/Makefile b/net/nagios-base/Makefile
index cc856dff460..6319f6a3449 100644
--- a/net/nagios-base/Makefile
+++ b/net/nagios-base/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.18 2008/06/09 12:36:15 gdt Exp $
+# $NetBSD: Makefile,v 1.19 2008/06/20 15:28:11 gdt Exp $
#
DISTNAME= nagios-2.5
PKGNAME= ${DISTNAME:S/-/-base-/}
-PKGREVISION= 6
+PKGREVISION= 7
CATEGORIES= net sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=nagios/}
@@ -31,6 +31,12 @@ USE_TOOLS+= mail:run perl
CONFIGURE_ARGS+= --with-mail=${TOOLS_PLATFORM.mail}
RCD_SCRIPTS+= nagios
+FILES_SUBST+= NAGIOS_USER=${NAGIOS_USER:Q}
+# XXX Merge this into the package proper.
+# Nagios drops permissions before creating the log file, so the
+# default location doesn't work. In the config file, change
+# lock_file=/var/run/nagios.lock to
+# lock_file=/var/run/nagios/nagios.lock
INSTALL_TARGET= install install-config
diff --git a/net/nagios-base/files/nagios.sh b/net/nagios-base/files/nagios.sh
index f0dd4715906..1b911e78e8d 100644
--- a/net/nagios-base/files/nagios.sh
+++ b/net/nagios-base/files/nagios.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: nagios.sh,v 1.5 2008/06/09 12:36:15 gdt Exp $
+# $NetBSD: nagios.sh,v 1.6 2008/06/20 15:28:11 gdt Exp $
#
# PROVIDE: nagios
# REQUIRE: DAEMON
@@ -23,7 +23,7 @@ extra_commands="test reload"
nagios_precmd()
{
mkdir -p ${piddir}
- chown nagios ${piddir}
+ chown @NAGIOS_USER@ ${piddir}
}
nagios_test()