]> mj.ucw.cz Git - nsc-5.git/blobdiff - m4/mkconf.m4
Do not generate BIND options any longer
[nsc-5.git] / m4 / mkconf.m4
index dff58a66214d510756784fdfa20a3b70dc1f97f5..8392b4dad048e9035e0bb55574264234cf0266ad 100644 (file)
@@ -1,6 +1,6 @@
 dnl ###
 dnl ### NSC -- BIND Config File Builder
-dnl ### (c) 1997--2003 Martin Mares <mj@ucw.cz>
+dnl ### (c) 1997--2006 Martin Mares <mj@ucw.cz>
 dnl ###
 include(m4/dnslib.m4)
 
@@ -9,6 +9,7 @@ include(m4/dnslib.m4)
 define(`DO_PRIMARY', `divert(0)zone "$1" in {
        type master;
        file "ZONEDIR/nsc_file_name($2)";
+ZZ_OPTIONS()dnl
 };
 
 divert(-1)')
@@ -22,19 +23,28 @@ define(`SECONDARY', `divert(0)zone "$1" in {
        type slave;
        file "BAKDIR/nsc_file_name($1)";
        masters { $2; };
+ZZ_OPTIONS()dnl
 };
 
 divert(-1)')
 
-# Definition of forwarders for both normal and slave mode
+# Definition of a forwarding zone
 
-define(`FORWard', `patsubst(`$@',`,',`; ')')
-define(`FORWArd', `divert(0)   forward $1;
+define(`FORWARDING', `divert(0)zone "$1" in {
+       type forward;
+       forward only;
        forwarders { FORWard(shift($@),)};
+ZZ_OPTIONS()dnl
+};
+
 divert(-1)')
 
-define(`FORWARD', `FORWArd(first, $@)')
-define(`SLAVE', `FORWArd(only, $@)')
+# Blackhole zones
+
+define(`BLACKHOLE', `divert(0)zone "$1" in {
+       type master;
+       file "zone/blackhole";
+};
 
 divert(-1)')
 
@@ -43,6 +53,12 @@ divert(-1)')
 define(`CONFIG', `divert(0)$1
 divert(-1)')
 
+# Setting domain options
+
+define(`ZZ_OPTIONS', `')
+
+define(`ZONE_OPTIONS', `define(`ZZ_OPTIONS', ifelse(`$1',`',`',``      $1''))')
+
 # The preamble
 
 divert(0)dnl
@@ -52,12 +68,6 @@ divert(0)dnl
 `#'    Please don't edit manually
 `#'
 
-options {
-       directory "ROOT";
-       interface-interval 0;
-BIND_OPTIONS
-};
-
 zone "." in {
        type hint;
        file "ROOTCACHE";