X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=m4%2Fmkconf.m4;h=7cbde7610ab922f8436bbcd1b0edf0fe23e0eeca;hb=41302bf2517bf92a9d402a01f1265744f6d646a8;hp=dff58a66214d510756784fdfa20a3b70dc1f97f5;hpb=747c80cf4a1294d69e8905c349d796e472768c16;p=nsc-5.git diff --git a/m4/mkconf.m4 b/m4/mkconf.m4 index dff58a6..7cbde76 100644 --- a/m4/mkconf.m4 +++ b/m4/mkconf.m4 @@ -1,6 +1,6 @@ dnl ### dnl ### NSC -- BIND Config File Builder -dnl ### (c) 1997--2003 Martin Mares +dnl ### (c) 1997--2006 Martin Mares 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,27 +23,54 @@ 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 -define(`FORWard', `patsubst(`$@',`,',`; ')') -define(`FORWArd', `divert(0) forward $1; +define(`FORWard', `patsubst(`$*',`,',`; ')') +define(`FORWArd', ` forward $1; forwarders { FORWard(shift($@),)}; -divert(-1)') +') define(`FORWARD', `FORWArd(first, $@)') define(`SLAVE', `FORWArd(only, $@)') divert(-1)') +# Definition of a forwarding zone + +define(`FORWARDING', `divert(0)zone "$1" in { + type forward; + forward only; + forwarders { FORWard(shift($@),)}; +ZZ_OPTIONS()dnl +}; + +divert(-1)') + +# Blackhole zones + +define(`BLACKHOLE', `divert(0)zone "$1" in { + type master; + file "zone/blackhole"; +}; + +divert(-1)') + # Manual insertion of config file material 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