dnssec-sign
changeset 33 d3269961e944
parent 32 d1addc2ec712
child 35 b809ae6c2f57
equal deleted inserted replaced
32:d1addc2ec712 33:d3269961e944
    86         }
    86         }
    87     }
    87     }
    88 }
    88 }
    89 
    89 
    90 #gibt zonen mit schluessel aber ohne signatur in die liste @auto
    90 #gibt zonen mit schluessel aber ohne signatur in die liste @auto
    91 for (<$master_dir/*>) {
    91 #for (<$master_dir/*>) {
    92     s#($master_dir/)(.*)#$2#;
    92 #    s#($master_dir/)(.*)#$2#;
    93     $zone = $_;
    93 #    $zone = $_;
    94 
    94 #
    95     if ( -e "$master_dir/$zone/.keycounter" ) {
    95 #    if ( -e "$master_dir/$zone/.keycounter" ) {
    96 
    96 #
    97         open( KC, "$master_dir/$zone/.keycounter" );
    97 #        open( KC, "$master_dir/$zone/.keycounter" );
    98         $kc = <KC>;
    98 #        $kc = <KC>;
    99         close(KC);
    99 #        close(KC);
   100 
   100 #
   101         if ( $kc < 1 ) {
   101 #        if ( $kc < 1 ) {
   102             push @auto, $zone;
   102 #            push @auto, $zone;
   103         }
   103 #        }
   104     }
   104 #    }
   105 }
   105 #}
   106 
       
   107 #erhoeht den serial der zone 
       
   108 for ( &del_double( @auto, @manu ) ) {
       
   109     unless ($serial_up == 1) {
       
   110         last
       
   111     }
       
   112 
       
   113     $zone = $_;
       
   114     my @zonefile = ();
       
   115     my $serial;
       
   116 
       
   117     open ( ZONEFILE, "$master_dir/$zone/$zone")
       
   118         or die "$master_dir/$zone/$zone: $!\n";
       
   119     @zonefile = <ZONEFILE>;
       
   120     close (ZONEFILE);
       
   121 
       
   122     for (@zonefile) {
       
   123         if (m#([0-9]{10}).*;.*serial#) {
       
   124             $serial = $1 + 1;
       
   125             s#(.*)([0-9]{10})(.*)#$1$serial$3#;
       
   126         }
       
   127     }
       
   128 
       
   129     open ( ZONEFILE, ">$master_dir/$zone/$zone")
       
   130         or die "$master_dir/$zone/$zone: $!\n";
       
   131     print ZONEFILE @zonefile;
       
   132     close (ZONEFILE);
       
   133 }
       
   134 
   106 
   135 # signiert alle zonen in @auto und @manu und erhoeht den wert in
   107 # signiert alle zonen in @auto und @manu und erhoeht den wert in
   136 # der keycounter-datei
   108 # der keycounter-datei
   137 for ( &del_double( @auto, @manu ) ) {
   109 for ( &del_double( @auto, @manu ) ) {
   138     $zone = $_;
   110     $zone = $_;