Module Name:    src
Committed By:   christos
Date:           Sat Apr 25 15:46:20 UTC 2009

Modified Files:
        src/etc/rc.d: named

Log Message:
handle new directory structure.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 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.20 src/etc/rc.d/named:1.21
--- src/etc/rc.d/named:1.20	Fri Apr 24 10:26:02 2009
+++ src/etc/rc.d/named	Sat Apr 25 11:46:19 2009
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: named,v 1.20 2009/04/24 14:26:02 christos Exp $
+# $NetBSD: named,v 1.21 2009/04/25 15:46:19 christos Exp $
 #
 
 # PROVIDE: named
@@ -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
 	#

Reply via email to