pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/nagios-base Substitute nagios user rather than har...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6b70568e6623
branches:  trunk
changeset: 543581:6b70568e6623
user:      gdt <gdt%pkgsrc.org@localhost>
date:      Fri Jun 20 15:28:11 2008 +0000

description:
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:

 net/nagios-base/Makefile        |  10 ++++++++--
 net/nagios-base/files/nagios.sh |   4 ++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diffs (48 lines):

diff -r b25fbafce42e -r 6b70568e6623 net/nagios-base/Makefile
--- a/net/nagios-base/Makefile  Fri Jun 20 15:17:16 2008 +0000
+++ b/net/nagios-base/Makefile  Fri Jun 20 15:28:11 2008 +0000
@@ -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 @@
 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 -r b25fbafce42e -r 6b70568e6623 net/nagios-base/files/nagios.sh
--- a/net/nagios-base/files/nagios.sh   Fri Jun 20 15:17:16 2008 +0000
+++ b/net/nagios-base/files/nagios.sh   Fri Jun 20 15:28:11 2008 +0000
@@ -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 @@
 nagios_precmd()
 {
     mkdir -p ${piddir}
-    chown nagios ${piddir}
+    chown @NAGIOS_USER@ ${piddir}
 }
 
 nagios_test()



Home | Main Index | Thread Index | Old Index