]> code.ossystems Code Review - openembedded-core.git/commitdiff
bind: remove -r option from rndc-confgen in initscript
authorYi Zhao <yi.zhao@windriver.com>
Sat, 30 Oct 2021 15:15:05 +0000 (23:15 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 1 Nov 2021 10:41:15 +0000 (10:41 +0000)
The -r option has been removed from rndc-confgen since bind 9.13[1].

Fix the bind startup error:
$ /etc/init.d/bind start
Starting domain name service: namedrndc-confgen: The -r option has been deprecated.
chmod: cannot access '/etc/bind/rndc.key': No such file or directory

[1]: https://gitlab.isc.org/isc-projects/bind9/-/commit/3a4f820d625c214cfb21f5e6d18ce9160d2a193b

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-connectivity/bind/bind-9.16.21/0001-avoid-start-failure-with-bind-user.patch
meta/recipes-connectivity/bind/bind-9.16.21/conf.patch

index 8db96ec049c7a3483936c48037acc91b9870b16e..ec1bc7b567256a207903c537c005eea841a1ec5f 100644 (file)
@@ -17,7 +17,7 @@ index b2eec60..6e03936 100644
 @@ -57,6 +57,7 @@ case "$1" in
        modprobe capability >/dev/null 2>&1 || true
        if [ ! -f /etc/bind/rndc.key ]; then
-           /usr/sbin/rndc-confgen -a -b 512 -r /dev/urandom
+           /usr/sbin/rndc-confgen -a -b 512
 +          chown root:bind /etc/bind/rndc.key >/dev/null 2>&1 || true
            chmod 0640 /etc/bind/rndc.key
        fi
index aad345f9fcfdfe000e41189cc14b69b6eb0dd637..aa3642acec3ee1e4de71be92c3504c7ad05bb4c8 100644 (file)
@@ -276,7 +276,7 @@ diff -urN bind-9.3.1.orig/init.d bind-9.3.1/init.d
 +
 +      modprobe capability >/dev/null 2>&1 || true
 +      if [ ! -f /etc/bind/rndc.key ]; then
-+          /usr/sbin/rndc-confgen -a -b 512 -r /dev/urandom
++          /usr/sbin/rndc-confgen -a -b 512
 +          chmod 0640 /etc/bind/rndc.key
 +      fi
 +      if [ -f /var/run/named/named.pid ]; then