Remove building with NOCRYPTO option
[minix.git] / external / bsd / bind / dist / bin / tests / system / stress / setup.pl
blob39df869aaa1b50de6ffea481617d641135115d92
1 #!/usr/bin/perl
3 # Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
4 # Copyright (C) 2000, 2001 Internet Software Consortium.
6 # Permission to use, copy, modify, and/or distribute this software for any
7 # purpose with or without fee is hereby granted, provided that the above
8 # copyright notice and this permission notice appear in all copies.
10 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
11 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
13 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 # PERFORMANCE OF THIS SOFTWARE.
18 # Id: setup.pl,v 1.6 2007/06/19 23:47:05 tbox Exp
21 # Set up test data for zone transfer quota tests.
23 use FileHandle;
25 my $n_zones = 5;
26 my $n_names = 1000;
28 make_zones(2, undef);
29 make_zones(3, "10.53.0.2");
30 make_zones(4, "10.53.0.3");
32 my $rootdelegations =
33 new FileHandle("ns1/root.db", "w") or die;
35 print $rootdelegations <<END;
36 \$TTL 300
37 . IN SOA gson.nominum.com. a.root.servers.nil. (
38 2000042100 ; serial
39 600 ; refresh
40 600 ; retry
41 1200 ; expire
42 600 ; minimum
44 . NS a.root-servers.nil.
45 a.root-servers.nil. A 10.53.0.1
46 END
48 for ($z = 0; $z < $n_zones; $z++) {
49 my $zn = sprintf("zone%06d.example", $z);
50 foreach $ns (qw(2 3 4)) {
51 print $rootdelegations "$zn. NS ns$ns.$zn.\n";
52 print $rootdelegations "ns$ns.$zn. A 10.53.0.$ns\n";
55 close $rootdelegations;
57 sub make_zones {
58 my ($nsno, $slaved_from) = @_;
59 my $namedconf = new FileHandle("ns$nsno/zones.conf", "w") or die;
60 for ($z = 0; $z < $n_zones; $z++) {
61 my $zn = sprintf("zone%06d.example", $z);
62 if (defined($slaved_from)) {
63 print $namedconf "zone \"$zn\" { type slave; " .
64 "file \"$zn.bk\"; masters { $slaved_from; }; };\n";
65 } else {
66 print $namedconf "zone \"$zn\" { " .
67 "type master; " .
68 "allow-update { any; }; " .
69 "file \"$zn.db\"; };\n";
71 my $fn = "ns$nsno/$zn.db";
72 my $f = new FileHandle($fn, "w") or die "open: $fn: $!";
73 print $f "\$TTL 300
74 \@ IN SOA ns2.$zn. hostmaster 1 300 120 3600 86400
75 @ NS ns2.$zn.
76 ns2.$zn. A 10.53.0.2
77 @ NS ns3.$zn.
78 ns3.$zn. A 10.53.0.3
79 @ NS ns4.$zn.
80 ns4.$zn. A 10.53.0.4
81 MX 10 mail1.isp.example.
82 MX 20 mail2.isp.example.
84 for ($i = 0; $i < $n_names; $i++) {
85 print $f sprintf("name%06d", $i) .
86 " A 10.0.0.1\n";
88 $f->close;