zoneconf.in: Support the `also-notify' variable.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 2 May 2012 18:23:03 +0000 (19:23 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 2 May 2012 18:23:03 +0000 (19:23 +0100)
This is currently a hopeless mess.

zoneconf.in

index 13c269d..43892db 100755 (executable)
@@ -1017,6 +1017,7 @@ define-configuration-space zone ZONECFG {
           "-Sfail" \
           "-Wfail" \
           "%z" "%f"]
+  define-list also-notify nil
 
   define setvar {name value} {
     dict set ZONECFG(var) $name $value
@@ -1281,6 +1282,9 @@ proc write-zone-stanza {view chan config} {
     master {
       puts $chan "\ttype master;"
       puts $chan "\tfile \"$zone(server-file-name)\";"
+      if {![string equal $zone(also-notify) "nil"]} {
+       puts $chan "\talso-notify { [join $zone(also-notify) {; }]; };"
+      }
       switch -exact -- $zone(type) {
        dynamic {
          write-ddns-update-policy "\t" $chan $config