File: setup.sh

package info (click to toggle)
bind9 1%3A9.16.50-1~deb11u2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 50,580 kB
  • sloc: ansic: 330,886; sh: 53,968; perl: 7,832; python: 3,949; makefile: 3,555; cpp: 2,156; xml: 114; lisp: 31
file content (55 lines) | stat: -rwxr-xr-x 1,961 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/sh

# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# SPDX-License-Identifier: MPL-2.0
#
# 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 https://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.

# shellcheck source=conf.sh
. "$SYSTEMTESTTOP/conf.sh"

$SHELL clean.sh

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

cp ns1/example.db ns2/
cp ns2/formerly-text.db.in ns2/formerly-text.db
cp ns1/empty.db.in ns1/under-limit.db

# counts are set with respect to these limits in named.conf:
#	max-records-per-type 2050;
#	max-types-per-name 500;
awk 'END {
	 for (i = 0; i < 500; i++ ) { print "500-txt TXT", i; }
	 for (i = 0; i < 1000; i++ ) { print "1000-txt TXT", i; }
	 for (i = 0; i < 2000; i++ ) { print "2000-txt TXT", i; }
}' </dev/null >>ns1/under-limit.db
cp ns1/empty.db.in ns1/on-limit.db
awk 'END {
	 for (i = 0; i < 500; i++ ) { print "500-txt TXT", i; }
	 for (i = 0; i < 1000; i++ ) { print "1000-txt TXT", i; }
	 for (i = 0; i < 2000; i++ ) { print "2000-txt TXT", i; }
	 for (i = 0; i < 2050; i++ ) { print "2050-txt TXT", i; }
}' </dev/null >>ns1/on-limit.db
cp ns1/empty.db.in ns1/over-limit.db
awk 'END {
	 for (i = 0; i < 500; i++ ) { print "500-txt TXT", i; }
	 for (i = 0; i < 1000; i++ ) { print "1000-txt TXT", i; }
	 for (i = 0; i < 2000; i++ ) { print "2000-txt TXT", i; }
	 for (i = 0; i < 2050; i++ ) { print "2050-txt TXT", i; }
	 for (i = 0; i < 2100; i++ ) { print "2100-txt TXT", i; }
}' </dev/null >>ns1/over-limit.db
cp ns1/empty.db.in ns1/255types.db
for ntype in $(seq 65280 65534); do
  echo "m TYPE${ntype} \# 0"
done >>ns1/255types.db
echo "m TXT bunny" >>ns1/255types.db
cd ns1 && $SHELL compile.sh