diff options
author | Christian Ruppert <idl0r@gentoo.org> | 2010-06-09 16:25:07 +0000 |
---|---|---|
committer | Christian Ruppert <idl0r@gentoo.org> | 2010-06-09 16:25:07 +0000 |
commit | 1dfe910d184b160f6730989c79b39cfcb9e8bf8f (patch) | |
tree | 1eccc143e1dff9d459ffb511b78602e35f682577 /net-dns/bind/files | |
parent | Fixed configure issue, bug #323187. Added audit USE flag. (diff) | |
download | gentoo-2-1dfe910d184b160f6730989c79b39cfcb9e8bf8f.tar.gz gentoo-2-1dfe910d184b160f6730989c79b39cfcb9e8bf8f.tar.bz2 gentoo-2-1dfe910d184b160f6730989c79b39cfcb9e8bf8f.zip |
Define the rndc KEY variable in /etc/conf.d/named, bug 323315.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'net-dns/bind/files')
-rw-r--r-- | net-dns/bind/files/named.confd-r3 | 2 | ||||
-rw-r--r-- | net-dns/bind/files/named.init-r7 | 23 |
2 files changed, 13 insertions, 12 deletions
diff --git a/net-dns/bind/files/named.confd-r3 b/net-dns/bind/files/named.confd-r3 index 959514fd97f5..0990cb721e0e 100644 --- a/net-dns/bind/files/named.confd-r3 +++ b/net-dns/bind/files/named.confd-r3 @@ -8,6 +8,8 @@ OPTIONS="" # RNDC needs to be told what server we're using sometimes. #SERVER="-s 127.0.0.1" +# rndc key to use +RNDC_KEY="${CHROOT}/etc/bind/rndc.key" # If you wish to run bind in a chroot: # 1) un-comment the CHROOT= assignment, below. You may use diff --git a/net-dns/bind/files/named.init-r7 b/net-dns/bind/files/named.init-r7 index 177be7647240..e32a3448b42b 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.3 2010/05/23 20:44:50 idl0r Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/files/named.init-r7,v 1.4 2010/06/09 16:25:05 idl0r Exp $ opts="start stop reload restart" @@ -26,7 +26,7 @@ _mount() { from=$1 to=$2 shift 2 - + opts="${*}" shift $# @@ -39,7 +39,7 @@ _mount() { _umount() { local dir=$1 - + if [[ -n $(grep "${dir}" /proc/mounts) ]]; then einfo "umount ${dir}" @@ -56,7 +56,7 @@ check_chroot() { [[ ! -d ${CHROOT}/var/run/named || ! -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 + [[ ! -c ${CHROOT}/dev/random && ! -c ${CHROOT}/dev/urandom ]] && return 1 fi return 0 } @@ -65,7 +65,7 @@ checkconfig() { if [ ! -f ${CHROOT}/etc/bind/named.conf ] ; then eerror "No ${CHROOT}/etc/bind/named.conf file exists!" fi - + # In case someone have $CPU set in /etc/conf.d/named if [ ${CPU} ] ; then CPU="-n ${CPU}" @@ -79,8 +79,6 @@ checkconfig() { | egrep -o -m1 "pid\-file +\".+\" *;" \ | cut -d\" -f2 ) - - KEY="${CHROOT}/etc/bind/rndc.key" } start() { @@ -112,8 +110,8 @@ stop() { ebegin "Stopping ${CHROOT:+chrooted }named" checkconfig || return 2 - if [ -f $KEY ] ; then - rndc $SERVER -k $KEY stop &>/dev/null + if [ -f $RNDC_KEY ] ; then + rndc $SERVER -k $RNDC_KEY stop &>/dev/null else start-stop-daemon --stop --quiet --pidfile $PIDFILE \ --exec /usr/sbin/named -- stop @@ -149,10 +147,11 @@ reload() { exit fi - if [ -f $KEY ] ; then + if [ -f $RNDC_KEY ] ; then ebegin "Reloading named.conf and zone files" - rndc $SERVER -k $KEY reload &>/dev/null + rndc $SERVER -k $RNDC_KEY reload &>/dev/null eend $? - else /etc/init.d/named restart &>/dev/null + else + /etc/init.d/named restart &>/dev/null fi } |