bin/zone-mk
changeset 103 0c9f37c94f0c
parent 94 54252e5987f2
child 110 3c70bf3355d4
equal deleted inserted replaced
102:3000f3962b14 103:0c9f37c94f0c
     4 use warnings;
     4 use warnings;
     5 use strict;
     5 use strict;
     6 use Pod::Usage;
     6 use Pod::Usage;
     7 use if $ENV{DEBUG} => "Smart::Comments";
     7 use if $ENV{DEBUG} => "Smart::Comments";
     8 use Cwd qw(abs_path);
     8 use Cwd qw(abs_path);
     9 use File::Path qw(make_path);
     9 use File::Path;
    10 use File::Basename;
    10 use File::Basename;
    11 use Getopt::Long;
    11 use Getopt::Long;
    12 use Net::LibIDN qw(:all);
    12 use Net::LibIDN qw(:all);
    13 use DNStools::Config qw(get_config);
    13 use DNStools::Config qw(get_config);
    14 use Template;
    14 use Template;
    48         my $zone     = idn_to_ascii($utf8zone, $CHARSET);
    48         my $zone     = idn_to_ascii($utf8zone, $CHARSET);
    49         my $zonefile   = "$cf{master_dir}/$zone/$zone";
    49         my $zonefile   = "$cf{master_dir}/$zone/$zone";
    50         my $configfile = "$cf{zone_conf_dir}/$zone";
    50         my $configfile = "$cf{zone_conf_dir}/$zone";
    51         my $now        = time;
    51         my $now        = time;
    52 
    52 
    53         make_path dirname $zonefile;
    53         mkpath dirname $zonefile;
    54 
    54 
    55         if (-f $zonefile and not $opt_force) {
    55         if (-f $zonefile and not $opt_force) {
    56             say "skipping $utf8zone: zone file '$zonefile' exists.";
    56             say "skipping $utf8zone: zone file '$zonefile' exists.";
    57             next;
    57             next;
    58         }
    58         }