X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=m4%2Fmkconf.m4;h=e5779217959d675eb42fbbc6e3d69522976e3206;hb=bad59d44a46728e6673514fae6689a849ffe33df;hp=0b4c96112271886ddd5858d4014f96c11dd2e873;hpb=ad59bf15d0e8a781477a25f69b97f7d4c9eb0e00;p=nsc-5.git diff --git a/m4/mkconf.m4 b/m4/mkconf.m4 index 0b4c961..e577921 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) @@ -8,7 +8,8 @@ include(m4/dnslib.m4) define(`DO_PRIMARY', `divert(0)zone "$1" in { type master; - file "ZONEDIR/$2"; + file "ZONEDIR/nsc_file_name($2)"; +ZZ_OPTIONS()dnl }; divert(-1)') @@ -20,18 +21,19 @@ define(`REVERSE', `DO_PRIMARY(REV($1),nsc_if_v6($1,`nsc_revblock6($1)',`nsc_reva define(`SECONDARY', `divert(0)zone "$1" in { type slave; - file "BAKDIR/$1"; + 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, $@)') @@ -43,6 +45,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