Home | History | Annotate | Line # | Download | only in upforwd
setup.sh revision 1.1.1.11
      1 #!/bin/sh
      2 
      3 # Copyright (C) Internet Systems Consortium, Inc. ("ISC")
      4 #
      5 # SPDX-License-Identifier: MPL-2.0
      6 #
      7 # This Source Code Form is subject to the terms of the Mozilla Public
      8 # License, v. 2.0.  If a copy of the MPL was not distributed with this
      9 # file, you can obtain one at https://mozilla.org/MPL/2.0/.
     10 #
     11 # See the COPYRIGHT file distributed with this work for additional
     12 # information regarding copyright ownership.
     13 
     14 . ../conf.sh
     15 
     16 cp -f ns1/example1.db ns1/example.db
     17 cp -f ns1/example3.db.in ns1/example3.db
     18 cp -f ns3/noprimary.db ns3/noprimary1.db
     19 
     20 copy_setports ns1/named.conf.in ns1/named.conf
     21 copy_setports ns2/named.conf.in ns2/named.conf
     22 copy_setports ns3/named1.conf.in ns3/named.conf
     23 
     24 if $FEATURETEST --enable-dnstap; then
     25   cat <<'EOF' >ns3/dnstap.conf
     26 	dnstap-identity "ns3";
     27 	dnstap-version "xxx";
     28 	dnstap-output file "dnstap.out";
     29 	dnstap { all; };
     30 EOF
     31 else
     32   echo "/* DNSTAP NOT ENABLED */" >ns3/dnstap.conf
     33 fi
     34 
     35 #
     36 # SIG(0) requires cryptographic support which may not be configured.
     37 #
     38 keyname=$($KEYGEN -q -n HOST -a ${DEFAULT_ALGORITHM} -T KEY sig0.example2 2>keyname.err)
     39 if test -n "$keyname"; then
     40   cat ns1/example1.db $keyname.key >ns1/example2.db
     41   echo $keyname >keyname
     42 else
     43   cat ns1/example1.db >ns1/example2.db
     44 fi
     45 cat_i <keyname.err
     46 
     47 cat ns1/example1.db >ns1/example2-toomanykeys.db
     48 for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17; do
     49   keyname=$($KEYGEN -q -n HOST -a ${DEFAULT_ALGORITHM} -T KEY sig0.example2-toomanykeys 2>/dev/null)
     50   if test -n "$keyname"; then
     51     cat $keyname.key >>ns1/example2-toomanykeys.db
     52     echo $keyname >keyname$i
     53   fi
     54 done
     55