Home | History | Annotate | Line # | Download | only in ixfr
      1      1.1  christos #!/bin/sh
      2  1.1.1.6  christos 
      3      1.1  christos # Copyright (C) Internet Systems Consortium, Inc. ("ISC")
      4      1.1  christos #
      5  1.1.1.6  christos # SPDX-License-Identifier: MPL-2.0
      6  1.1.1.6  christos #
      7      1.1  christos # This Source Code Form is subject to the terms of the Mozilla Public
      8  1.1.1.6  christos # License, v. 2.0.  If a copy of the MPL was not distributed with this
      9  1.1.1.5  christos # file, you can obtain one at https://mozilla.org/MPL/2.0/.
     10      1.1  christos #
     11      1.1  christos # See the COPYRIGHT file distributed with this work for additional
     12      1.1  christos # information regarding copyright ownership.
     13      1.1  christos 
     14  1.1.1.7  christos . ../conf.sh
     15      1.1  christos 
     16  1.1.1.5  christos # Set up db files for zone "test" - this is a series of four
     17  1.1.1.5  christos # versions of the zone, the second and third having small changes
     18  1.1.1.5  christos # and the fourth having a large one.
     19  1.1.1.5  christos 
     20  1.1.1.7  christos testdb() {
     21  1.1.1.7  christos   cat <<EOF
     22  1.1.1.5  christos \$ORIGIN $1
     23  1.1.1.5  christos \$TTL    15
     24  1.1.1.5  christos @  15  IN        SOA ns1.test. hostmaster.test. (
     25  1.1.1.5  christos                               $2 ; serial
     26  1.1.1.5  christos                               3H ; refresh
     27  1.1.1.5  christos                               15 ; retry
     28  1.1.1.5  christos                               1w ; expire
     29  1.1.1.5  christos                               3h ; minimum
     30  1.1.1.5  christos                              )
     31  1.1.1.5  christos        IN  NS     ns1.test.
     32  1.1.1.5  christos        IN  NS     ns2.test.
     33  1.1.1.5  christos        IN  NS     ns5.test.
     34  1.1.1.5  christos ns1    IN  A      10.53.0.3
     35  1.1.1.5  christos ns2    IN  A      10.53.0.4
     36  1.1.1.5  christos ns5    IN  A      10.53.0.5
     37  1.1.1.5  christos EOF
     38  1.1.1.5  christos 
     39  1.1.1.7  christos   i=0
     40  1.1.1.7  christos   while [ $i -lt $3 ]; do
     41  1.1.1.7  christos     echo "host$i IN A 192.0.2.$i"
     42  1.1.1.7  christos     i=$((i + 1))
     43  1.1.1.7  christos   done
     44  1.1.1.5  christos }
     45  1.1.1.5  christos 
     46  1.1.1.7  christos testdb test. 1 60 >ns3/mytest.db
     47  1.1.1.7  christos testdb test. 2 61 >ns3/mytest1.db
     48  1.1.1.7  christos testdb test. 3 62 >ns3/mytest2.db
     49  1.1.1.7  christos testdb test. 4 0 >ns3/mytest3.db
     50  1.1.1.5  christos 
     51  1.1.1.5  christos # Set up similar db files for sub.test, which will have IXFR disabled
     52  1.1.1.7  christos testdb sub.test. 1 60 >ns3/subtest.db
     53  1.1.1.7  christos testdb sub.test. 3 61 >ns3/subtest1.db
     54  1.1.1.5  christos 
     55  1.1.1.5  christos # Set up a large zone
     56  1.1.1.5  christos i=0
     57  1.1.1.7  christos $SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 3 >ns3/large.db
     58  1.1.1.5  christos while [ $i -lt 10000 ]; do
     59  1.1.1.7  christos   echo "record$i 10 IN TXT this is record %i" >>ns3/large.db
     60  1.1.1.7  christos   i=$((i + 1))
     61  1.1.1.5  christos done
     62