summaryrefslogtreecommitdiff
path: root/package/bind/files/named.init
diff options
context:
space:
mode:
Diffstat (limited to 'package/bind/files/named.init')
-rw-r--r--package/bind/files/named.init6
1 files changed, 5 insertions, 1 deletions
diff --git a/package/bind/files/named.init b/package/bind/files/named.init
index c3ad09d85..ede96cabe 100644
--- a/package/bind/files/named.init
+++ b/package/bind/files/named.init
@@ -7,11 +7,15 @@ case $1 in
autostop) ;;
autostart)
test x"${named:-NO}" = x"NO" && exit 0
+ test x"$named" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start
exec sh $0 start
;;
start)
+ if [ ! -f /etc/rndc.key ]; then
+ rndc-confgen -a 2>/dev/null
+ fi
if [ -f /etc/bind/named.conf ]; then
- /usr/sbin/named -c /etc/bind/named.conf
+ /usr/sbin/named -c /etc/bind/named.conf &
fi
;;
stop)