local.pm.ex-2
changeset 30 b642c116da13
parent 29 dcebfb4a011c
equal deleted inserted replaced
29:dcebfb4a011c 30:b642c116da13
     1 # Example
     1 # Example
     2 # $Id$
       
     3 # $URL$
       
     4 
     2 
     5 # remove the next line if you know, what you're doing
     3 # remove the next line if you know, what you're doing
     6 #die "Sure?  You should adapt this file to your needs!";
     4 #die "Sure?  You should adapt this file to your needs!";
     7 
     5 
     8 package local;
     6 package local;
    30     allow-transfer { $transferees; };
    28     allow-transfer { $transferees; };
    31 };
    29 };
    32 
    30 
    33 __
    31 __
    34 
    32 
       
    33     # set 
       
    34     #	allow-new-zones yes;
       
    35     # in /etc/bind/named.conf.options
    35     system rndc => (
    36     system rndc => (
    36 	addzone => $zone,
    37 	addzone => $zone,
    37 	$txt
    38 	$txt
    38     );
    39     );
    39 
    40 
    40     if ($?) {
    41     if ($?) {
    41 	warn "rndc addzone $zone failed\n";
    42 	warn "rndc addzone $zone failed\n";
    42 	return 0;
    43 	return 0;
    43     }
    44     }
    44 
    45 
    45     warn "zone $zone added via rndc addzone\n";
    46     $@ = "zone $zone added via rndc addzone\n";
    46     return 1;
    47     return 1;
    47 
    48 
    48 }
    49 }
    49 
    50 
    50 1;
    51 1;