dnssec-sign
changeset 24 b1234b9824f0
parent 22 7229d1c95ea8
child 25 c02caf4e0eb6
equal deleted inserted replaced
23:9dc00aa49452 24:b1234b9824f0
     1 #!/usr/bin/perl -w
     1 #!/usr/bin/perl 
     2 
     2 
     3 use strict;
     3 use strict;
       
     4 use warnings;
       
     5 
       
     6 my @configs = qw(dnstools.conf /etc/dnstools.conf);
       
     7 
       
     8 foreach (grep {-f} @configs) {
       
     9 	open(CONFIG, $_) or die "Can't open $_: $!\n";
       
    10 }
       
    11 die "Can't open config (searched: @configs)\n"
       
    12 	if not seek(CONFIG, 0, 0);
     4 
    13 
     5 my %config;
    14 my %config;
     6 open (CONFIG, "dnstools.conf");
       
     7 while (<CONFIG>) {
    15 while (<CONFIG>) {
     8         chomp;
    16         chomp;
     9         s/#.*//;
    17         s/#.*//;
    10         s/\t//g;
    18         s/\t//g;
    11         s/\s//g;
    19         s/\s//g;