lib/DNStools/UpdateSerial.pm
changeset 129 642a27894c86
parent 128 ce219be2c383
child 135 ad9d6900e4ea
equal deleted inserted replaced
128:ce219be2c383 129:642a27894c86
   111             next;
   111             next;
   112         }
   112         }
   113 
   113 
   114         my $stamp_mtime = (stat _)[9];
   114         my $stamp_mtime = (stat _)[9];
   115         my $zone_file_mtime  = (stat "$_/$zone")[9] or die "Can't stat '$_/$zone': $!";
   115         my $zone_file_mtime  = (stat "$_/$zone")[9] or die "Can't stat '$_/$zone': $!";
   116         # TODO: do this here?
   116 
   117         my $kc_file_mtime = 0;
   117         # stamp age 'wins' if mtimes are equal because update_serial will both
   118         $kc_file_mtime = (stat "$_/.keycounter")[9] or die "Can't stat '$_/.keycounter': $!" if -f "$_/.keycounter";
   118         # modify the zonefile and update the stamp which both is likely to
   119 
   119         # happen at the 'same' time unless you have very very high precision
   120         next unless $stamp_mtime < $zone_file_mtime or $stamp_mtime < $kc_file_mtime;
   120         # mtimes
       
   121         next unless $stamp_mtime < $zone_file_mtime;
   121 
   122 
   122         push @r, $zone;
   123         push @r, $zone;
   123         say " * $zone: zone file modified";
   124         say " * $zone: zone file modified";
   124     }
   125     }
   125     return @r;
   126     return @r;