setup.sh revision 1.1.1.9 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 # shellcheck source=conf.sh
15 . ../conf.sh
16
17 cp ns1/example.db ns2/
18 cp ns2/formerly-text.db.in ns2/formerly-text.db
19 cp ns1/empty.db.in ns1/under-limit.db
20
21 # counts are set with respect to these limits in named.conf:
22 # max-records-per-type 2050;
23 # max-types-per-name 500;
24 awk 'END {
25 for (i = 0; i < 500; i++ ) { print "500-txt TXT", i; }
26 for (i = 0; i < 1000; i++ ) { print "1000-txt TXT", i; }
27 for (i = 0; i < 2000; i++ ) { print "2000-txt TXT", i; }
28 }' </dev/null >>ns1/under-limit.db
29 cp ns1/under-limit.db ns1/under-limit-kasp.db
30
31 cp ns1/empty.db.in ns1/below-limit.db
32 awk 'END {
33 for (i = 0; i < 500; i++ ) { print "500-txt TXT", i; }
34 for (i = 0; i < 1000; i++ ) { print "1000-txt TXT", i; }
35 for (i = 0; i < 2000; i++ ) { print "2000-txt TXT", i; }
36 for (i = 0; i < 2050; i++ ) { print "2050-txt TXT", i; }
37 }' </dev/null >>ns1/below-limit.db
38 cp ns1/below-limit.db ns1/below-limit-kasp.db
39
40 cp ns1/empty.db.in ns1/above-limit.db
41 awk 'END {
42 for (i = 0; i < 500; i++ ) { print "500-txt TXT", i; }
43 for (i = 0; i < 1000; i++ ) { print "1000-txt TXT", i; }
44 for (i = 0; i < 2000; i++ ) { print "2000-txt TXT", i; }
45 for (i = 0; i < 2050; i++ ) { print "2050-txt TXT", i; }
46 for (i = 0; i < 2100; i++ ) { print "2100-txt TXT", i; }
47 }' </dev/null >>ns1/above-limit.db
48
49 cp ns1/empty.db.in ns1/255types.db
50 for ntype in $(seq 65280 65534); do
51 echo "m TYPE${ntype} \# 0"
52 done >>ns1/255types.db
53 echo "m TXT bunny" >>ns1/255types.db
54 (cd ns1 && $SHELL compile.sh)
55 (cd ns4 && $SHELL compile.sh)
56