Refresh bind after updating zone file


A tiny update to make sure it keeps the spacing anyone will use: "--- .../plugins/---- function!UPDSERIAL(date, num) if (strftime("%Y%m%d") == a:date) return a:date . '01' endfunction command Soa :%s/\(2[0-9]\\)\([0-9]\\)\(\s*;\s*Serial\)/\=UPDSERIAL(subm atch(1), submatch(2)) .Thanks to a blog posting by Tollef Fog Heen I learnt today that there is an Emacs mode for working with Zone files.(Perhaps I shouldn't be suprised; there seems to be a mode for everything! The next time you load the file in Emacs you'll see that you've got syntax highlighting, and if you write any changes to the file the Serial will be incremented appropriately.) If you make changes to your zone file Emacs will automatically update the serial number for you, in the canonical format of ;; -*- zone -*- ;; ;; Zone file for ;; 86400 IN SOA ( 2006033100 ; Serial YYYYMMDDXX 10800 ; Refresh 3600 ; Retry 3600000 ; Expire 86400 ) ; minimum IN NS ns1. Obviously this won't help you if you use another editor, or another nameserver, but it was a neat trick that I thought was worth sharing. again and again, but this time it is a pure hazard!!



While we're at it, let's just stop using vi, because you might find yourself on a system with only ed.

Please visit this page to clear all LQ-related cookies.



Refresh bind after updating zone file comments


  • DNS Dynamic Update DNS and BIND, 4th Edition profil de paulette60

    paulette60

    BIND 8 name servers defer updating a zone's serial. Both name servers incorporate the record of the changes in the log file into the zone if the log file exists.…
  • Rndc reload not reflecting the changes made in zone file. profil de paulette60

    paulette60

    Yes i always increment the serial number before updating zone file. after i upgraded the bind. not reflecting the changes made in zone file.…