aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/bind
diff options
context:
space:
mode:
authorRoy Li <rongqing.li@windriver.com>2012-11-15 02:27:54 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-11-24 15:12:07 +0000
commit9ad8f7c2bae021269e9a8e35f9fc44a16d23bb6f (patch)
tree318ee12624179272eb9e90aa8016d9c6028b6e93 /meta/recipes-connectivity/bind
parent67924616963fee9cb9f2405d93c74a8cc10b6eab (diff)
downloadopenembedded-core-9ad8f7c2bae021269e9a8e35f9fc44a16d23bb6f.tar.gz
bind: make "/etc/init.d/bind stop" work
Add some configurations, make rndc command be able to controls the named daemon. Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/bind')
-rw-r--r--meta/recipes-connectivity/bind/bind-9.8.1/conf.patch15
-rw-r--r--meta/recipes-connectivity/bind/bind-9.8.1/make-etc-initd-bind-stop-work.patch42
-rw-r--r--meta/recipes-connectivity/bind/bind_9.8.1.bb3
3 files changed, 55 insertions, 5 deletions
diff --git a/meta/recipes-connectivity/bind/bind-9.8.1/conf.patch b/meta/recipes-connectivity/bind/bind-9.8.1/conf.patch
index fd5606e84c..6fea70ed15 100644
--- a/meta/recipes-connectivity/bind/bind-9.8.1/conf.patch
+++ b/meta/recipes-connectivity/bind/bind-9.8.1/conf.patch
@@ -241,7 +241,7 @@ diff -urN bind-9.3.1.orig/conf/zones.rfc1918 bind-9.3.1/conf/zones.rfc1918
diff -urN bind-9.3.1.orig/init.d bind-9.3.1/init.d
--- bind-9.3.1.orig/init.d 1970-01-01 01:00:00.000000000 +0100
+++ bind-9.3.1/init.d 2005-07-10 23:09:58.000000000 +0200
-@@ -0,0 +1,63 @@
+@@ -0,0 +1,70 @@
+#!/bin/sh
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
@@ -259,9 +259,16 @@ diff -urN bind-9.3.1.orig/init.d bind-9.3.1/init.d
+ echo -n "Starting domain name service: named"
+
+ modprobe capability >/dev/null 2>&1 || true
++ if [ ! -f /etc/bind/rndc.key ]; then
++ /usr/sbin/rndc-confgen -a -b 512 -r /dev/urandom
++ chown 0640 /etc/bind/rndc.key
++ fi
++ if [ -f /var/run/named/named.pid ]; then
++ ps `cat /var/run/named/named.pid` > /dev/null && exit 1
++ fi
+
+ # dirs under /var/run can go away on reboots.
-+ mkdir -p /var/run/bind/run
++ mkdir -p /var/run/named
+ mkdir -p /var/cache/bind
+ chmod 775 /var/run/bind/run
+ chown root:bind /var/run/bind/run >/dev/null 2>&1 || true
@@ -271,7 +278,7 @@ diff -urN bind-9.3.1.orig/init.d bind-9.3.1/init.d
+ exit 1
+ fi
+ if start-stop-daemon --start --quiet --exec /usr/sbin/named \
-+ --pidfile /var/run/bind/run/named.pid -- $OPTIONS; then
++ --pidfile /var/run/named/named.pid -- $OPTIONS; then
+ if [ -x /sbin/resolvconf ] ; then
+ echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo
+ fi
@@ -284,7 +291,7 @@ diff -urN bind-9.3.1.orig/init.d bind-9.3.1/init.d
+ if [ -x /sbin/resolvconf ]; then
+ /sbin/resolvconf -d lo
+ fi
-+ /usr/sbin/rndc stop
++ /usr/sbin/rndc stop >/dev/null 2>&1
+ echo "."
+ ;;
+
diff --git a/meta/recipes-connectivity/bind/bind-9.8.1/make-etc-initd-bind-stop-work.patch b/meta/recipes-connectivity/bind/bind-9.8.1/make-etc-initd-bind-stop-work.patch
new file mode 100644
index 0000000000..146f3e35db
--- /dev/null
+++ b/meta/recipes-connectivity/bind/bind-9.8.1/make-etc-initd-bind-stop-work.patch
@@ -0,0 +1,42 @@
+bind: make "/etc/init.d/bind stop" work
+
+Upstream-Status: Inappropriate [configuration]
+
+Add some configurations, make rndc command be able to controls
+the named daemon.
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ conf/named.conf | 5 +++++
+ conf/rndc.conf | 5 +++++
+ 2 files changed, 10 insertions(+), 0 deletions(-)
+ create mode 100644 conf/rndc.conf
+
+diff --git a/conf/named.conf b/conf/named.conf
+index 95829cf..c8899e7 100644
+--- a/conf/named.conf
++++ b/conf/named.conf
+@@ -47,3 +47,8 @@ zone "255.in-addr.arpa" {
+ // root-delegation-only exclude { "DE"; "MUSEUM"; };
+
+ include "/etc/bind/named.conf.local";
++include "/etc/bind/rndc.key" ;
++controls {
++ inet 127.0.0.1 allow { localhost; }
++ keys { rndc-key; };
++};
+diff --git a/conf/rndc.conf b/conf/rndc.conf
+new file mode 100644
+index 0000000..a0b481d
+--- /dev/null
++++ b/conf/rndc.conf
+@@ -0,0 +1,5 @@
++include "/etc/bind/rndc.key";
++options {
++ default-server localhost;
++ default-key rndc-key;
++};
+
+--
+1.7.5.4
+
diff --git a/meta/recipes-connectivity/bind/bind_9.8.1.bb b/meta/recipes-connectivity/bind/bind_9.8.1.bb
index 2efd09de23..23ff0b459e 100644
--- a/meta/recipes-connectivity/bind/bind_9.8.1.bb
+++ b/meta/recipes-connectivity/bind/bind_9.8.1.bb
@@ -6,11 +6,12 @@ LICENSE = "ISC & BSD"
LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=0fbe2a3ab3c68ac3fea3cad13093877c"
DEPENDS = "openssl libcap"
-PR = "r3"
+PR = "r4"
SRC_URI = "ftp://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
file://conf.patch \
file://cross-build-fix.patch \
+ file://make-etc-initd-bind-stop-work.patch \
"
SRC_URI[md5sum] = "cf31117c5d35af34d4c0702970ad9fb7"