]> mj.ucw.cz Git - nsc-5.git/blob - m4/mkconf.m4
First step to version 3.0. Changes too extensive to comment them.
[nsc-5.git] / m4 / mkconf.m4
1 dnl ###
2 dnl ### NSC -- BIND Config File Builder
3 dnl ### (c) 1997--2003 Martin Mares <mj@ucw.cz>
4 dnl ###
5 include(m4/dnslib.m4)
6
7 # Definition of primary domains
8
9 define(`DO_PRIMARY', `divert(0)zone "$1" in {
10         type master;
11         file "ZONEDIR/$2";
12 };
13
14 divert(-1)')
15
16 define(`PRIMARY', `DO_PRIMARY($1,$1)')
17 define(`REVERSE', `DO_PRIMARY(REV($1),nsc_if_v6($1,`nsc_revblock6($1)',`nsc_revaddr($1)'))')
18
19 # Definition of secondary domain
20
21 define(`SECONDARY', `divert(0)zone "$1" in {
22         type slave;
23         file "BAKDIR/$1";
24         masters { $2; };
25 };
26
27 divert(-1)')
28
29 # Definition of forwarders for both normal and slave mode
30
31 define(`FORWard', `patsubst(`$@',`,',`; ')')
32 define(`FORWArd', `divert(0)    forward $1;
33         forwarders { FORWard(shift($@),)};
34 divert(-1)')
35
36 define(`FORWARD', `FORWArd(first, $@)')
37 define(`SLAVE', `FORWArd(only, $@)')
38
39 divert(-1)')
40
41 # Manual insertion of config file material
42
43 define(`CONFIG', `divert(0)$1
44 divert(-1)')
45
46 # The preamble
47
48 divert(0)dnl
49 `#'
50 `#'     BIND configuration file
51 `#'     Generated by NSCVER (mkconf.m4) on CURRENT_DATE
52 `#'     Please don't edit manually
53 `#'
54
55 options {
56         directory "ROOT";
57         interface-interval 0;
58 BIND_OPTIONS
59 };
60
61 zone "." in {
62         type hint;
63         file "ROOTCACHE";
64 };
65
66 divert(-1)