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 # Set up db files for zone "test" - this is a series of four 17 # versions of the zone, the second and third having small changes 18 # and the fourth having a large one. 19 20 testdb() { 21 cat <<EOF 22 \$ORIGIN $1 23 \$TTL 15 24 @ 15 IN SOA ns1.test. hostmaster.test. ( 25 $2 ; serial 26 3H ; refresh 27 15 ; retry 28 1w ; expire 29 3h ; minimum 30 ) 31 IN NS ns1.test. 32 IN NS ns2.test. 33 IN NS ns5.test. 34 ns1 IN A 10.53.0.3 35 ns2 IN A 10.53.0.4 36 ns5 IN A 10.53.0.5 37 EOF 38 39 i=0 40 while [ $i -lt $3 ]; do 41 echo "host$i IN A 192.0.2.$i" 42 i=$((i + 1)) 43 done 44 } 45 46 testdb test. 1 60 >ns3/mytest.db 47 testdb test. 2 61 >ns3/mytest1.db 48 testdb test. 3 62 >ns3/mytest2.db 49 testdb test. 4 0 >ns3/mytest3.db 50 51 # Set up similar db files for sub.test, which will have IXFR disabled 52 testdb sub.test. 1 60 >ns3/subtest.db 53 testdb sub.test. 3 61 >ns3/subtest1.db 54 55 # Set up a large zone 56 i=0 57 $SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 3 >ns3/large.db 58 while [ $i -lt 10000 ]; do 59 echo "record$i 10 IN TXT this is record %i" >>ns3/large.db 60 i=$((i + 1)) 61 done 62