summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ruppert <idl0r@gentoo.org>2010-08-26 16:03:41 +0000
committerChristian Ruppert <idl0r@gentoo.org>2010-08-26 16:03:41 +0000
commit5902831772760e601a333e815d7c745e6700216d (patch)
treecd9a77fddeb81951390defbb9b190986fb9bab07 /net-dns/bind
parentMarked ~hppa too. (diff)
downloadgentoo-2-5902831772760e601a333e815d7c745e6700216d.tar.gz
gentoo-2-5902831772760e601a333e815d7c745e6700216d.tar.bz2
gentoo-2-5902831772760e601a333e815d7c745e6700216d.zip
Create piddir in the init script if necessary, bug 334535 and bug 332633, thanks to Eray Aslan <eray.aslan@caf.com.tr>
(Portage version: 2.2_rc69/cvs/Linux x86_64)
Diffstat (limited to 'net-dns/bind')
-rw-r--r--net-dns/bind/ChangeLog7
-rwxr-xr-xnet-dns/bind/files/named.init-r510
-rw-r--r--net-dns/bind/files/named.init-r711
3 files changed, 23 insertions, 5 deletions
diff --git a/net-dns/bind/ChangeLog b/net-dns/bind/ChangeLog
index d65da7755a3e..d80a10e55bc0 100644
--- a/net-dns/bind/ChangeLog
+++ b/net-dns/bind/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-dns/bind
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.287 2010/07/31 21:23:42 idl0r Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/ChangeLog,v 1.288 2010/08/26 16:03:41 idl0r Exp $
+
+ 26 Aug 2010; Christian Ruppert <idl0r@gentoo.org> files/named.init-r5,
+ files/named.init-r7:
+ Create piddir in the init script if necessary, bug 334535 and bug 332633,
+ thanks to Eray Aslan <eray.aslan@caf.com.tr>
31 Jul 2010; Christian Ruppert <idl0r@gentoo.org> bind-9.6.2_p2.ebuild,
bind-9.7.0_p2-r1.ebuild, bind-9.7.1_p2.ebuild:
diff --git a/net-dns/bind/files/named.init-r5 b/net-dns/bind/files/named.init-r5
index 734ac5d76b36..de10032f158b 100755
--- a/net-dns/bind/files/named.init-r5
+++ b/net-dns/bind/files/named.init-r5
@@ -1,7 +1,7 @@
#!/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 $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/files/named.init-r5,v 1.2 2010/08/26 16:03:41 idl0r Exp $
opts="start stop reload restart"
@@ -31,6 +31,12 @@ checkconfig() {
)
KEY="${CHROOT}/etc/bind/rndc.key"
+
+ # create piddir (usually /var/run/named) if necessary
+ local piddir="${PIDFILE%/*}"
+ if [ ! -d "${piddir}" ] ; then
+ checkpath -q -d -o root:named -m 0770 "${piddir}" || return 1
+ fi
}
start() {
diff --git a/net-dns/bind/files/named.init-r7 b/net-dns/bind/files/named.init-r7
index e32a3448b42b..ae887e9ecdfd 100644
--- a/net-dns/bind/files/named.init-r7
+++ b/net-dns/bind/files/named.init-r7
@@ -1,7 +1,7 @@
#!/sbin/runscript
# 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-r7,v 1.4 2010/06/09 16:25:05 idl0r Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/files/named.init-r7,v 1.5 2010/08/26 16:03:41 idl0r Exp $
opts="start stop reload restart"
@@ -53,11 +53,18 @@ check_chroot() {
[[ ! -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
fi
+
+ # create piddir (usually /var/run/named) if necessary
+ local piddir="${PIDFILE%/*}"
+ if [ ! -d "${piddir}" ] ; then
+ checkpath -q -d -o root:named -m 0770 "${piddir}" || return 1
+ fi
+
return 0
}