Switch example NSD config to splitting master and slave zones into different
authorsthen <sthen@openbsd.org>
Sun, 12 Apr 2015 11:49:39 +0000 (11:49 +0000)
committersthen <sthen@openbsd.org>
Sun, 12 Apr 2015 11:49:39 +0000 (11:49 +0000)
subdirectories (/var/nsd/zones/{master,slave}) and create these in mtree.
Nearly everybody that uses NSD for slave zones that I talked to already has
this layout. Bikesh^Wdiscussed with ajacoutot florian millert and others.

ok ajacoutot@ florian@ phessler@ claudio@ jung@

etc/mtree/4.4BSD.dist
etc/nsd.conf

index 6416f05..c510324 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: 4.4BSD.dist,v 1.269 2014/12/22 15:39:28 tedu Exp $
+#      $OpenBSD: 4.4BSD.dist,v 1.270 2015/04/12 11:49:39 sthen Exp $
 
 /set type=dir uname=root gname=wheel mode=0755
 
@@ -738,6 +738,10 @@ var
 
         # ./var/nsd/zones
         zones                  uname=root gname=wheel mode=0755
+            master             uname=root gname=wheel mode=0755
+            ..
+            slave              uname=root gname=_nsd mode=0775
+            ..
         ..
     ..
 
index 0bc4c29..c549160 100644 (file)
@@ -1,4 +1,4 @@
-# $OpenBSD: nsd.conf,v 1.10 2015/03/10 22:16:30 millert Exp $
+# $OpenBSD: nsd.conf,v 1.11 2015/04/12 11:49:39 sthen Exp $
 
 server:
        hide-version: yes
@@ -22,14 +22,14 @@ remote-control:
 ## master zone example
 #zone:
 #      name: "example.com"
-#      zonefile: "example.com"
+#      zonefile: "master/example.com"
 #      notify: 192.0.2.1 NOKEY
 #      provide-xfr: 192.0.2.1 NOKEY
 
 ## slave zone example
 #zone:
 #      name: "example.net"
-#      zonefile: "example.net"
+#      zonefile: "slave/example.net"
 #      allow-notify: 192.0.2.2 tsig1.example.com.
 #      request-xfr: 192.0.2.2 tsig1.example.com.
 
@@ -38,7 +38,7 @@ remote-control:
 ## %1 - first character of zone name, %2 second, ## %3 third.
 ## %z - topleveldomain label of zone, %y, %x next labels in name.
 #pattern:
-#      name: "primary"
-#      zonefile: "%s.zone"
+#      name: "master"
+#      zonefile: "master/%s.zone"
 #      notify: 192.0.2.1 NOKEY
 #      provide-xfr: 192.0.2.1 NOKEY