make ud-replicate work slightly more accurately for zones
authorStephen Gran <steve@lobefin.net>
Sun, 4 Oct 2009 23:53:47 +0000 (00:53 +0100)
committerStephen Gran <steve@lobefin.net>
Sun, 4 Oct 2009 23:53:47 +0000 (00:53 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
ud-replicate

index 86f4c1f..ada301c 100755 (executable)
@@ -164,18 +164,19 @@ fi
 
 rndc_reload=0
 if [ -e /var/lib/misc/thishost/dns-sshfp ]; then
-  if ! cmp -s /var/lib/misc/thishost/dns-sshfp $tempfile; then
+  if ! cmp -s /var/lib/misc/thishost/dns-sshfp $tempfile2; then
+    /git/HOOKS/write_zonefile debian.org
     rndc_reload=1
   fi
 fi
 
-#if [ -e /var/lib/misc/thishost/dns-zone ]; then
-#  if cmp /var/lib/misc/thishost/dns-zone $tempfile2; then
-#    rndc_reload=1
-#  fi
-#fi
+if [ -e /var/lib/misc/thishost/dns-zone ]; then
+  if ! cmp -s /var/lib/misc/thishost/dns-zone $tempfile2; then
+    /git/HOOKS/write_zonefile debian.net
+    rndc_reload=1
+  fi
+fi
 
 if [ "${rndc_reload}" -gt 0 ]; then
-  /git/HOOKS/write_zonefile debian.org
   rndc reload
 fi