Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc/rc.d create /etc/rndc.key on start if it doesn't already...



details:   https://anonhg.NetBSD.org/src/rev/1f520e42f86d
branches:  trunk
changeset: 797178:1f520e42f86d
user:      spz <spz%NetBSD.org@localhost>
date:      Tue Jul 08 07:04:07 2014 +0000

description:
create /etc/rndc.key on start if it doesn't already exist

diffstat:

 etc/rc.d/named |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r 5918671a466d -r 1f520e42f86d etc/rc.d/named
--- a/etc/rc.d/named    Tue Jul 08 06:01:47 2014 +0000
+++ b/etc/rc.d/named    Tue Jul 08 07:04:07 2014 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: named,v 1.23 2012/10/01 18:46:43 christos Exp $
+# $NetBSD: named,v 1.24 2014/07/08 07:04:07 spz Exp $
 #
 
 # PROVIDE: named
@@ -63,6 +63,11 @@
 
 named_precmd()
 {
+       if [ ! -e "/etc/rndc.key" ]; then
+               echo "Generating rndc.key"
+               /usr/sbin/rndc-confgen -a
+       fi
+
        if [ -z "$named_chrootdir" ]; then
                if [ ! -d "/etc/namedb/keys" ]; then
                        mkdir -m 775 "/etc/namedb/keys"



Home | Main Index | Thread Index | Old Index