1#!/usr/bin/perl 2# 3# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC") 4# Copyright (C) 2000, 2001 Internet Software Consortium. 5# 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. 9# 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. 17 18# $Id$ 19 20# 21# Set up test data for zone transfer quota tests. 22# 23use FileHandle; 24 25my $masterconf = new FileHandle("ns1/zones.conf", "w") or die; 26my $slaveconf = new FileHandle("ns2/zones.conf", "w") or die; 27 28for ($z = 0; $z < 300; $z++) { 29 my $zn = sprintf("zone%06d.example", $z); 30 print $masterconf "zone \"$zn\" { type master; file \"$zn.db\"; };\n"; 31 print $slaveconf "zone \"$zn\" { type slave; file \"$zn.bk\"; masters { 10.53.0.1; }; };\n"; 32 my $fn = "ns1/$zn.db"; 33 my $f = new FileHandle($fn, "w") or die "open: $fn: $!"; 34 print $f "\$TTL 300 35\@ IN SOA ns1 . 1 300 120 3600 86400 36 NS ns1 37 NS ns2 38ns1 A 10.53.0.1 39ns2 A 10.53.0.2 40 MX 10 mail1.isp.example. 41 MX 20 mail2.isp.example. 42www A 10.0.0.1 43xyzzy A 10.0.0.2 44"; 45 $f->close; 46} 47