Move more bind config into domtool, remove hardcoded /var/domtool references
[hcoop/domtool2.git] / src / plugins / bind.sml
index ca35c2c..65c2ed8 100644 (file)
@@ -229,7 +229,7 @@ val () = Slave.registerFileHandler (fn fs =>
                                           val {dir, file} = OS.Path.splitDirFile (#file fs)
                                                             
                                           fun dnsChanged () =
-                                              if #domain fs = !didDomain orelse Slave.hostname () <> Config.Bind.masterNode then
+                                              if #domain fs = !didDomain then
                                                   ()
                                               else if Slave.isDelete (#action fs) then
                                                   let
@@ -348,7 +348,7 @@ val () = Slave.registerPostHandler
                      ()))
 
 val () = Domain.registerResetLocal (fn () =>
-                                      ignore (OS.Process.system (Config.rm ^ " -rf /var/domtool/zones/*")))
+                                      ignore (OS.Process.system (Config.rm ^ " -rf " ^ Config.Bind.zonePath ^ "/*")))
 
 val () = Domain.registerDescriber (Domain.considerAll
                                   [Domain.Filename {filename = "named.conf",
@@ -374,12 +374,4 @@ val _ = Env.type_one "srv_domain"
        Env.string
        validSrvDomain
 
-val _ = Env.registerFunction ("dns_master_node",
-                             fn [] => SOME (EString Config.Bind.masterNode, dl)
-                             | _ => NONE)
-
-val _ = Env.registerFunction ("dns_slave_nodes",
-                             fn [] => SOME (EList (map (fn n => (EString n, dl)) Config.Bind.slaveNodes), dl)
-                             | _ => NONE)
-
 end