Module Name: src
Committed By: riz
Date: Fri Jan 7 01:06:34 UTC 2011
Modified Files:
src/etc/rc.d [netbsd-5]: named
Log Message:
Pull up following revision(s) (requested by tron in ticket #1519):
etc/rc.d/named: revision 1.21
etc/rc.d/named: revision 1.19
Adjust for new default location of the pid file.
handle new directory structure.
To generate a diff of this commit:
cvs rdiff -u -r1.18.28.1 -r1.18.28.2 src/etc/rc.d/named
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/etc/rc.d/named
diff -u src/etc/rc.d/named:1.18.28.1 src/etc/rc.d/named:1.18.28.2
--- src/etc/rc.d/named:1.18.28.1 Sun Nov 15 06:05:52 2009
+++ src/etc/rc.d/named Fri Jan 7 01:06:34 2011
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: named,v 1.18.28.1 2009/11/15 06:05:52 snj Exp $
+# $NetBSD: named,v 1.18.28.2 2011/01/07 01:06:34 riz Exp $
#
# PROVIDE: named
@@ -13,7 +13,7 @@
name="named"
rcvar=$name
command="/usr/sbin/${name}"
-pidfile="/var/run/${name}.pid"
+pidfile="/var/run/${name}/${name}.pid"
start_precmd="named_precmd"
extra_commands="reload"
required_dirs="$named_chrootdir" # if it is set, it must exist
@@ -114,7 +114,12 @@
cmp -s /etc/localtime "${named_chrootdir}/etc/localtime" || \
cp -p /etc/localtime "${named_chrootdir}/etc/localtime"
fi
- ln -fs "${named_chrootdir}${pidfile}" ${pidfile}
+
+ local piddir="$(dirname "${pidfile}")"
+ mkdir -p "${named_chrootdir}${piddir}" "${piddir}"
+ chmod 755 "${named_chrootdir}${piddir}" "${piddir}"
+ chown named:named "${named_chrootdir}${piddir}" "${piddir}"
+ ln -fs "${named_chrootdir}${pidfile}" "${pidfile}"
# Change run_rc_commands()'s internal copy of $named_flags
#