From a5c5977bef44b7b014af590515ea1f93d7d51f46 Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Sat, 30 Oct 2021 23:15:05 +0800 Subject: bind: remove -r option from rndc-confgen in initscript 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 Signed-off-by: Richard Purdie --- .../bind/bind-9.16.21/0001-avoid-start-failure-with-bind-user.patch | 2 +- meta/recipes-connectivity/bind/bind-9.16.21/conf.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/recipes-connectivity/bind/bind-9.16.21/0001-avoid-start-failure-with-bind-user.patch b/meta/recipes-connectivity/bind/bind-9.16.21/0001-avoid-start-failure-with-bind-user.patch index 8db96ec049..ec1bc7b567 100644 --- a/meta/recipes-connectivity/bind/bind-9.16.21/0001-avoid-start-failure-with-bind-user.patch +++ b/meta/recipes-connectivity/bind/bind-9.16.21/0001-avoid-start-failure-with-bind-user.patch @@ -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 diff --git a/meta/recipes-connectivity/bind/bind-9.16.21/conf.patch b/meta/recipes-connectivity/bind/bind-9.16.21/conf.patch index aad345f9fc..aa3642acec 100644 --- a/meta/recipes-connectivity/bind/bind-9.16.21/conf.patch +++ b/meta/recipes-connectivity/bind/bind-9.16.21/conf.patch @@ -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 -- cgit 1.2.3-korg