setup.pl revision a2b565626ba9a98eecc7b82cb86c6d68c38d3d94
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence#!/usr/bin/perl
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence#
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence# Copyright (C) 2000 Internet Software Consortium.
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence#
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence# Permission to use, copy, modify, and distribute this software for any
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence# purpose with or without fee is hereby granted, provided that the above
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence# copyright notice and this permission notice appear in all copies.
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence#
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence# ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence# OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence# CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence# DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence# PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence# SOFTWARE.
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence#
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence# Set up test data for zone transfer quota tests.
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence#
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrenceuse FileHandle;
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrencemy $masterconf = new FileHandle("ns1/zones.conf", "w") or die;
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrencemy $slaveconf = new FileHandle("ns2/zones.conf", "w") or die;
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrencefor ($z = 0; $z < 300; $z++) {
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence my $zn = sprintf("zone%06d.example", $z);
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence print $masterconf "zone \"$zn\" { type master; file \"$zn.db\"; };\n";
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence print $slaveconf "zone \"$zn\" { type slave; file \"$zn.bk\"; masters { 10.53.0.1; }; };\n";
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence my $fn = "ns1/$zn.db";
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence my $f = new FileHandle($fn, "w") or die "open: $fn: $!";
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence print $f "\$TTL 300
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence\@ IN SOA . . 1 300 120 3600 86400
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence NS ns1
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence NS ns2
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence MX 10 mail1.isp.example.
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence MX 20 mail2.isp.example.
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrencewww A 10.0.0.1
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrencexyzzy A 10.0.0.2
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence";
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence $f->close;
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence}
2d67c2474475acf52c8251dc48bfb7565ee5f2ffDavid Lawrence