summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin V. Arkhipov <voxus@gentoo.org>2005-08-03 16:54:38 +0000
committerKonstantin V. Arkhipov <voxus@gentoo.org>2005-08-03 16:54:38 +0000
commitb29f0a17857d2d037518a676b1961c6a4a39cd97 (patch)
tree649dca14e55fa89260b0bcac91eab9fe3534b3c4 /net-dns/bind/files
parentRemoved ed/sed since Default.ini and DefUser.ini are provided by ut2004-data ... (diff)
downloadgentoo-2-b29f0a17857d2d037518a676b1961c6a4a39cd97.tar.gz
gentoo-2-b29f0a17857d2d037518a676b1961c6a4a39cd97.tar.bz2
gentoo-2-b29f0a17857d2d037518a676b1961c6a4a39cd97.zip
* closing bugs #99878 and #99597
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'net-dns/bind/files')
-rw-r--r--net-dns/bind/files/digest-bind-9.2.5-r52
-rw-r--r--net-dns/bind/files/digest-bind-9.3.1-r11
-rw-r--r--net-dns/bind/files/digest-bind-9.3.1-r3 (renamed from net-dns/bind/files/digest-bind-9.3.1-r2)0
-rwxr-xr-xnet-dns/bind/files/named.rc72
4 files changed, 74 insertions, 1 deletions
diff --git a/net-dns/bind/files/digest-bind-9.2.5-r5 b/net-dns/bind/files/digest-bind-9.2.5-r5
new file mode 100644
index 000000000000..917f82e7d0d6
--- /dev/null
+++ b/net-dns/bind/files/digest-bind-9.2.5-r5
@@ -0,0 +1,2 @@
+MD5 35a265fb97a068c066e22306ea32fd1f bind-9.2.5.tar.gz 4504389
+MD5 3bb820ced02fa2db7ae37e5288a73706 dlz-9.2.5.patch.bz2 135932
diff --git a/net-dns/bind/files/digest-bind-9.3.1-r1 b/net-dns/bind/files/digest-bind-9.3.1-r1
deleted file mode 100644
index 027fffee4bd7..000000000000
--- a/net-dns/bind/files/digest-bind-9.3.1-r1
+++ /dev/null
@@ -1 +0,0 @@
-MD5 9ff3204eea27184ea0722f37e43fc95d bind-9.3.1.tar.gz 4673603
diff --git a/net-dns/bind/files/digest-bind-9.3.1-r2 b/net-dns/bind/files/digest-bind-9.3.1-r3
index 4307a2849697..4307a2849697 100644
--- a/net-dns/bind/files/digest-bind-9.3.1-r2
+++ b/net-dns/bind/files/digest-bind-9.3.1-r3
diff --git a/net-dns/bind/files/named.rc b/net-dns/bind/files/named.rc
new file mode 100755
index 000000000000..22fa5eca4bfe
--- /dev/null
+++ b/net-dns/bind/files/named.rc
@@ -0,0 +1,72 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/files/named.rc,v 1.1 2005/08/03 16:54:38 voxus Exp $
+
+opts="start stop reload restart"
+
+depend() {
+ need net
+ use logger
+ provide dns
+}
+
+checkconfig() {
+ if [ ! -f ${CHROOT}/etc/bind/named.conf ] ; then
+ eerror "No ${CHROOT}/etc/bind/named.conf file exists!"
+ fi
+
+ # In case someone doesn't have $CPU set from /etc/conf.d/named
+ if [ ! ${CPU} ] ; then
+ CPU="1"
+ fi
+
+ # As with the named.conf test, above, there's no need
+ # for chroot and non-chroot cases here
+ PIDFILE=$(grep "pid-file" ${CHROOT}/etc/bind/named.conf | \
+ egrep -v ".*[#,//].*pid-file" | \
+ head -n 1 | \
+ sed -ne 's:.*pid-file\(.*\)\"\(.*\)\";:\2:p')
+ [ -n "$PIDFILE" ] || PIDFILE=/var/run/named.pid
+
+ PIDFILE="${CHROOT}$PIDFILE"
+
+ KEY="${CHROOT}/etc/bind/rndc.key"
+}
+
+start() {
+ ebegin "Starting ${CHROOT:+chrooted }named"
+ checkconfig || return 1
+ start-stop-daemon --start --quiet --pidfile ${PIDFILE} \
+ --exec /usr/sbin/named \
+ -- -u named -n ${CPU} ${OPTIONS} ${CHROOT:+-t $CHROOT}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${CHROOT:+chrooted }named"
+ checkconfig || return 2
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+ --exec /usr/sbin/named -- stop
+ eend $?
+}
+
+reload() {
+ checkconfig || return 3
+ if [ ! -f $PIDFILE ] ; then
+ /etc/init.d/named start &>/dev/null
+ exit
+ fi
+
+ if [ -f $KEY ] ; then
+ ebegin "Reloading named.conf and zone files"
+ rndc -k $KEY reload &>/dev/null
+ eend $?
+ else /etc/init.d/named restart &>/dev/null
+ fi
+}
+
+restart() {
+ svc_stop
+ svc_start
+}