--- a/lib/DNStools/UpdateSerial.pm Tue May 31 17:02:16 2011 +0200
+++ b/lib/DNStools/UpdateSerial.pm Wed Jun 01 15:46:55 2011 +0200
@@ -113,11 +113,12 @@
my $stamp_mtime = (stat _)[9];
my $zone_file_mtime = (stat "$_/$zone")[9] or die "Can't stat '$_/$zone': $!";
- # TODO: do this here?
- my $kc_file_mtime = 0;
- $kc_file_mtime = (stat "$_/.keycounter")[9] or die "Can't stat '$_/.keycounter': $!" if -f "$_/.keycounter";
- next unless $stamp_mtime < $zone_file_mtime or $stamp_mtime < $kc_file_mtime;
+ # stamp age 'wins' if mtimes are equal because update_serial will both
+ # modify the zonefile and update the stamp which both is likely to
+ # happen at the 'same' time unless you have very very high precision
+ # mtimes
+ next unless $stamp_mtime < $zone_file_mtime;
push @r, $zone;
say " * $zone: zone file modified";