[OE-core] [RFC PATCH 6/7][dora] bind: add init.d/bind status command

Mark Hatle mark.hatle at windriver.com
Thu Dec 5 22:57:45 UTC 2013


From: Yue Tao <Yue.Tao at windriver.com>

-- Sent for YP compliance --

Signed-off-by: Yue Tao <Yue.Tao at windriver.com>
Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
---
 .../bind-add-init-bind-status-command.patch        | 45 ++++++++++++++++++++++
 meta/recipes-connectivity/bind/bind_9.8.1.bb       |  3 +-
 2 files changed, 47 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-connectivity/bind/bind-9.8.1/bind-add-init-bind-status-command.patch

diff --git a/meta/recipes-connectivity/bind/bind-9.8.1/bind-add-init-bind-status-command.patch b/meta/recipes-connectivity/bind/bind-9.8.1/bind-add-init-bind-status-command.patch
new file mode 100644
index 0000000..8ed3c56
--- /dev/null
+++ b/meta/recipes-connectivity/bind/bind-9.8.1/bind-add-init-bind-status-command.patch
@@ -0,0 +1,45 @@
+--- a/init.d
++++ b/init.d
+@@ -2,6 +2,8 @@
+ 
+ PATH=/sbin:/bin:/usr/sbin:/usr/bin
+ 
++. /etc/init.d/functions
++
+ # for a chrooted server: "-u bind -t /var/lib/named"
+ # Don't modify this line, change or create /etc/default/bind9.
+ OPTIONS=""
+@@ -104,6 +106,12 @@ umount_chroot_conf() {
+     fi
+ }
+ 
++rhstatus() {
++  [ -x /usr/sbin/rndc ] && /usr/sbin/rndc status;
++  status /usr/sbin/named;
++  return $?
++}
++
+ case "$1" in
+     start)
+ 	echo -n "Starting domain name service: named"
+@@ -172,6 +180,11 @@ case "$1" in
+ 	echo "."	
+     ;;
+ 
++    status)
++	rhstatus;
++	exit $?
++    ;;
++
+     reload)
+ 	/usr/sbin/rndc reload
+     ;;
+@@ -183,7 +196,7 @@ case "$1" in
+     ;;
+     
+     *)
+-	echo "Usage: /etc/init.d/bind {start|stop|reload|restart|force-reload}" >&2
++	echo "Usage: /etc/init.d/bind {start|stop|reload|restart|status|force-reload}" >&2
+ 	exit 1
+     ;;
+ esac
diff --git a/meta/recipes-connectivity/bind/bind_9.8.1.bb b/meta/recipes-connectivity/bind/bind_9.8.1.bb
index 66a092c..45695e4 100644
--- a/meta/recipes-connectivity/bind/bind_9.8.1.bb
+++ b/meta/recipes-connectivity/bind/bind_9.8.1.bb
@@ -6,7 +6,7 @@ LICENSE = "ISC & BSD"
 LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=0fbe2a3ab3c68ac3fea3cad13093877c"
 
 DEPENDS = "openssl libcap"
-PR = "r6"
+PR = "r7"
 
 SRC_URI = "ftp://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
            file://conf.patch \
@@ -23,6 +23,7 @@ SRC_URI = "ftp://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
            file://setup-chroot-hooks.patch \
            file://init.d-fix-indentation.patch \
            file://init.d-add-support-for-read-only-rootfs.patch \
+           file://bind-add-init-bind-status-command.patch \
 	   "
 
 SRC_URI[md5sum] = "cf31117c5d35af34d4c0702970ad9fb7"
-- 
1.8.1.2.545.g2f19ada




More information about the Openembedded-core mailing list