]> mj.ucw.cz Git - nsc-5.git/blob - m4/mkconf.m4
Preparing for release of version 4.0
[nsc-5.git] / m4 / mkconf.m4
1 dnl ###
2 dnl ### NSC -- BIND Config File Builder
3 dnl ### (c) 1997--2011 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 a forwarding zone
32
33 define(`FORWARDING', `divert(0)zone "$1" in {
34         type forward;
35         forward only;
36         forwarders { FORWard(shift($@),)};
37 ZZ_OPTIONS()dnl
38 };
39
40 divert(-1)')
41
42 # Blackhole zones
43
44 define(`BLACKHOLE', `divert(0)zone "$1" in {
45         type master;
46         file "zone/blackhole";
47 };
48
49 divert(-1)')
50
51 # Root hint zone
52
53 define(`ROOTHINT', `divert(0)zone "." in {
54         type hint;
55         file "ROOTCACHE";
56 };
57
58 divert(-1)')
59
60 # Manual insertion of config file material
61
62 define(`CONFIG', `divert(0)$1
63 divert(-1)')
64
65 # Setting domain options
66
67 define(`ZZ_OPTIONS', `')
68
69 define(`ZONE_OPTIONS', `define(`ZZ_OPTIONS', ifelse(`$1',`',`',``       $1''))')
70
71 # The preamble
72
73 divert(0)dnl
74 `#'
75 `#'     BIND configuration file
76 `#'     Generated by NSCVER (mkconf.m4) on CURRENT_DATE
77 `#'     Please don't edit manually
78 `#'
79
80 divert(-1)