/var/run can be mounted tmpfs and cleared during a reboot. Hence, programs (or their init scripts) should not rely on dirs under /var/run and should create them if necessary instead. bind fails to start when /var/run/named is missing: Aug 26 11:41:10 east named[5807]: couldn't open pid file '/var/run/named/named.pid': No such file or directory Aug 26 11:41:10 east named[5807]: exiting (due to early fatal error) The attached init scripts creates the missing dir if necessary. For your ref: --- files/named.init-r5.old 2010-08-26 11:32:26.000000000 +0300 +++ files/named.init-r5 2010-08-26 12:13:50.000000000 +0300 @@ -1,5 +1,5 @@ #!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-dns/bind/files/named.init-r5,v 1.1 2007/06/02 22:34:48 voxus Exp $ @@ -29,6 +29,11 @@ | egrep -o -m1 "pid\-file +\".+\" *;" \ | cut -d\" -f2 ) + # create PIDDIR (usually /var/run/named) if necessary + local PIDDIR="${PIDFILE%/*}" + if [ ! -d "${PIDDIR}" ] ; then + checkpath -q -d -o named:named -m 0755 "${PIDDIR}" || return 1 + fi KEY="${CHROOT}/etc/bind/rndc.key" } --- files/named.init-r7.old 2010-08-26 11:32:37.000000000 +0300 +++ files/named.init-r7 2010-08-26 12:13:30.000000000 +0300 @@ -53,7 +53,7 @@ [[ ! -d ${CHROOT}/dev || ! -d ${CHROOT}/etc || ! -d ${CHROOT}/var ]] && return 1 [[ ! -d ${CHROOT}/var/run || ! -d ${CHROOT}/var/log ]] && return 1 [[ ! -d ${CHROOT}/etc/bind || ! -d ${CHROOT}/var/bind ]] && return 1 - [[ ! -d ${CHROOT}/var/run/named || ! -d ${CHROOT}/var/log/named ]] && return 1 + [[ ! -d ${CHROOT}/var/log/named ]] && return 1 [[ ! -e ${CHROOT}/etc/localtime ]] && return 1 [[ ! -c ${CHROOT}/dev/null || ! -c ${CHROOT}/dev/zero ]] && return 1 [[ ! -c ${CHROOT}/dev/random && ! -c ${CHROOT}/dev/urandom ]] && return 1 @@ -79,6 +79,11 @@ | egrep -o -m1 "pid\-file +\".+\" *;" \ | cut -d\" -f2 ) + # create PIDDIR (usually /var/run/named) if necessary + local PIDDIR="${PIDFILE%/*}" + if [ ! -d "${PIDDIR}" ] ; then + checkpath -q -d -o named:named -m 0755 "${PIDDIR}" || return 1 + fi } start() { Reproducible: Always
Created attachment 244639 [details] named.init-r5
Created attachment 244641 [details] named.init-r7
This problem has been fixed in our software repository. The fix will be available on the mirrors soon. Thank you for your bug report.