bind: make "/etc/init.d/bind stop" work
cover bind: make "/etc/init.d/bind stop" work
From: Roy.Li <[email protected]>
The following changes since commit b53ea6687b6201c8c5ab5cb0d2a845ef7e7b2abe:
sstate: Bump version number to deal with layout fixes (2012-11-14 23:37:26 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib roy/bind
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=roy/bind
Roy Li (1):
bind: make "/etc/init.d/bind stop" work
.../bind/bind-9.8.1/conf.patch | 15 +++++-- .../bind-9.8.1/make-etc-initd-bind-stop-work.patch | 42 ++++++++++++++++++++ meta/recipes-connectivity/bind/bind_9.8.1.bb | 3 +- 3 files changed, 55 insertions(+), 5 deletions(-) create mode 100644 meta/recipes-connectivity/bind/bind-9.8.1/make-etc-initd-bind-stop-work.patch
Signature · 1 line
1.7.4.1
PATCH 1/1 bind: make "/etc/init.d/bind stop" work
From: Roy Li <[email protected]>
Add some configurations, make rndc command be able to controls the named daemon.
Signed-off-by Roy Li <[email protected]>
--- .../bind/bind-9.8.1/conf.patch | 15 +++++-- .../bind-9.8.1/make-etc-initd-bind-stop-work.patch | 42 ++++++++++++++++++++ meta/recipes-connectivity/bind/bind_9.8.1.bb | 3 +- 3 files changed, 55 insertions(+), 5 deletions(-) create mode 100644 meta/recipes-connectivity/bind/bind-9.8.1/make-etc-initd-bind-stop-work.patch
meta/recipes-connectivity/bind/bind-9.8.1/conf.patch +11 -4
@@ -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 "." + ;; +
meta/recipes-connectivity/bind/bind-9.8.1/make-etc-initd-bind-stop-work.patch new file +42 -0
42 lines not on this page · raw message
meta/recipes-connectivity/bind/bind_9.8.1.bb +2 -1
@@ -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"
Signature · 1 line
1.7.4.1