]> mj.ucw.cz Git - nsc-5.git/blob - m4/mkconf.m4
Updated the LSM.
[nsc-5.git] / m4 / mkconf.m4
1 dnl ###
2 dnl ### NSC -- BIND Config File Builder
3 dnl ### (c) 1997--2006 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/nsc_file_name($2)";
12 ZZ_OPTIONS()dnl
13 };
14
15 divert(-1)')
16
17 define(`PRIMARY', `DO_PRIMARY($1,$1)')
18 define(`REVERSE', `DO_PRIMARY(REV($1),nsc_if_v6($1,`nsc_revblock6($1)',`nsc_revaddr($1)'))')
19
20 # Definition of secondary domain
21
22 define(`SECONDARY', `divert(0)zone "$1" in {
23         type slave;
24         file "BAKDIR/nsc_file_name($1)";
25         masters { $2; };
26 ZZ_OPTIONS()dnl
27 };
28
29 divert(-1)')
30
31 # Definition of forwarders for both normal and slave mode
32
33 define(`FORWard', `patsubst(`$*',`,',`; ')')
34 define(`FORWArd', `divert(0)    forward $1;
35         forwarders { FORWard(shift($@),)};
36 divert(-1)')
37
38 define(`FORWARD', `FORWArd(first, $@)')
39 define(`SLAVE', `FORWArd(only, $@)')
40
41 divert(-1)')
42
43 # Manual insertion of config file material
44
45 define(`CONFIG', `divert(0)$1
46 divert(-1)')
47
48 # Setting domain options
49
50 define(`ZZ_OPTIONS', `')
51
52 define(`ZONE_OPTIONS', `define(`ZZ_OPTIONS', ifelse(`$1',`',`',``       $1''))')
53
54 # The preamble
55
56 divert(0)dnl
57 `#'
58 `#'     BIND configuration file
59 `#'     Generated by NSCVER (mkconf.m4) on CURRENT_DATE
60 `#'     Please don't edit manually
61 `#'
62
63 options {
64         directory "ROOT";
65         interface-interval 0;
66 BIND_OPTIONS
67 };
68
69 zone "." in {
70         type hint;
71         file "ROOTCACHE";
72 };
73
74 divert(-1)