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