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/2934b571e7f7
branches:  trunk
changeset: 330417:2934b571e7f7
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 3ee10c2d2781 -r 2934b571e7f7 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