2000-09-08 01:48:06 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
#
|
2018-02-23 03:53:12 -05:00
|
|
|
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
2012-06-28 21:39:47 -04:00
|
|
|
#
|
2016-06-27 00:56:38 -04:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2018-02-23 03:53:12 -05:00
|
|
|
#
|
|
|
|
|
# See the COPYRIGHT file distributed with this work for additional
|
|
|
|
|
# information regarding copyright ownership.
|
2000-09-08 01:48:06 -04:00
|
|
|
|
2014-09-30 17:24:16 -04:00
|
|
|
SYSTEMTESTTOP=..
|
|
|
|
|
. $SYSTEMTESTTOP/conf.sh
|
2000-09-08 01:48:06 -04:00
|
|
|
|
2018-02-20 18:43:27 -05:00
|
|
|
$SHELL clean.sh
|
|
|
|
|
|
2004-03-09 20:06:06 -05:00
|
|
|
cp -f ns1/example1.db ns1/example.db
|
2011-09-01 22:25:07 -04:00
|
|
|
cp -f ns3/nomaster.db ns3/nomaster1.db
|
2018-02-20 18:43:27 -05:00
|
|
|
|
|
|
|
|
copy_setports ns1/named.conf.in ns1/named.conf
|
|
|
|
|
copy_setports ns2/named.conf.in ns2/named.conf
|
|
|
|
|
copy_setports ns3/named.conf.in ns3/named.conf
|
2014-09-30 17:24:16 -04:00
|
|
|
|
2014-10-01 21:07:01 -04:00
|
|
|
#
|
|
|
|
|
# SIG(0) required cryptographic support which may not be configured.
|
|
|
|
|
#
|
2017-04-21 02:24:23 -04:00
|
|
|
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
|
2016-10-19 11:18:42 -04:00
|
|
|
keyname=`$KEYGEN -q -r $RANDFILE -n HOST -a RSASHA1 -b 1024 -T KEY sig0.example2 2>/dev/null | $D2U`
|
2014-10-01 21:07:01 -04:00
|
|
|
if test -n "$keyname"
|
|
|
|
|
then
|
|
|
|
|
cat ns1/example1.db $keyname.key > ns1/example2.db
|
|
|
|
|
echo $keyname > keyname
|
|
|
|
|
else
|
|
|
|
|
cat ns1/example1.db > ns1/example2.db
|
|
|
|
|
rm -f keyname
|
|
|
|
|
fi
|