Change some node filenames to avoid clashes with subdomains
[hcoop/domtool2.git] / src / plugins / bind.sml
index 768478f..10892a2 100644 (file)
@@ -35,7 +35,7 @@ val dns : Domain.files option ref = ref NONE
 
 val _ = Domain.registerBefore
            (fn _ => dns := Option.map (fn node => Domain.domainsFile {node = node,
-                                                                      name = "dns"})
+                                                                      name = "dns.conf"})
                                       (Domain.dnsMaster ()))
        
 val _ = Domain.registerAfter
@@ -244,7 +244,7 @@ val () = Slave.registerFileHandler (fn fs =>
                                               else
                                                   let
                                                       val inf = TextIO.openIn (OS.Path.joinDirFile {dir = #dir fs,
-                                                                                                    file = "soa"})
+                                                                                                    file = "soa.conf"})
                                                       val kind = readLine inf
                                                       val ttl = readILine inf
                                                       val ns = readLine inf
@@ -292,7 +292,7 @@ val () = Slave.registerFileHandler (fn fs =>
                                                       val _ = TextIO.closeOut outf
 
                                                       val dns = OS.Path.joinDirFile {dir = #dir fs,
-                                                                                     file = "dns"}
+                                                                                     file = "dns.conf"}
 
                                                       val fname = OS.Path.joinBaseExt {base = #domain fs,
                                                                                        ext = SOME "zone"}
@@ -329,8 +329,8 @@ val () = Slave.registerFileHandler (fn fs =>
                                                   end
                                       in
                                           case file of
-                                              "soa" => dnsChanged ()
-                                            | "dns" => dnsChanged ()
+                                              "soa.conf" => dnsChanged ()
+                                            | "dns.conf" => dnsChanged ()
                                             | "named.conf" => namedChanged := true
                                             | _ => ()
                                       end)
@@ -354,7 +354,7 @@ val () = Domain.registerDescriber (Domain.considerAll
                                   [Domain.Filename {filename = "named.conf",
                                                     heading = "named.conf addition:",
                                                     showEmpty = false},
-                                   Domain.Filename {filename = "dns",
+                                   Domain.Filename {filename = "dns.conf",
                                                     heading = "DNS zonefile contents:",
                                                     showEmpty = false}])