Move more bind config into domtool, remove hardcoded /var/domtool references
[hcoop/domtool2.git] / src / plugins / bind.sml
index 20aeb60..65c2ed8 100644 (file)
@@ -229,7 +229,7 @@ val () = Slave.registerFileHandler (fn fs =>
                                           val {dir, file} = OS.Path.splitDirFile (#file fs)
                                                             
                                           fun dnsChanged () =
                                           val {dir, file} = OS.Path.splitDirFile (#file fs)
                                                             
                                           fun dnsChanged () =
-                                              if #domain fs = !didDomain orelse Slave.hostname () <> Config.masterNode then
+                                              if #domain fs = !didDomain then
                                                   ()
                                               else if Slave.isDelete (#action fs) then
                                                   let
                                                   ()
                                               else if Slave.isDelete (#action fs) then
                                                   let
@@ -257,7 +257,7 @@ val () = Slave.registerFileHandler (fn fs =>
                                                       val min = readILine inf
                                                       val () = TextIO.closeIn inf
 
                                                       val min = readILine inf
                                                       val () = TextIO.closeIn inf
 
-                                                      val serialPath = OS.Path.joinDirFile {dir = Config.serialDir,
+                                                      val serialPath = OS.Path.joinDirFile {dir = Config.Bind.serialDir,
                                                                                             file = #domain fs}
 
                                                       val oldSerial = let
                                                                                             file = #domain fs}
 
                                                       val oldSerial = let
@@ -348,7 +348,7 @@ val () = Slave.registerPostHandler
                      ()))
 
 val () = Domain.registerResetLocal (fn () =>
                      ()))
 
 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",
 
 val () = Domain.registerDescriber (Domain.considerAll
                                   [Domain.Filename {filename = "named.conf",