]> mj.ucw.cz Git - nsc-5.git/blobdiff - m4/dnslib.m4
More v3.0 work.
[nsc-5.git] / m4 / dnslib.m4
index 8049ee7793a62c0f9b668c127a07f5987562e93b..0c74b459102c3cf97c803f3542ba7056d5e8cc19 100644 (file)
@@ -19,6 +19,10 @@ define(MINUTES, `eval($1*60)')
 define(HOURS, `eval($1*3600)')
 define(DAYS, `eval($1*86400)')
 
+# Since slashes can occur in zone names, we convert them to @'s
+
+define(nsc_file_name, `translit($1,/,@)')
+
 # Reverse an IP address
 
 define(nsc_revIPa, `ifelse($#, 1, `$1', `nsc_revIPa(shift($@)).$1')')
@@ -80,11 +84,11 @@ define(`nsc__forloop',
 define(`nsc_fatal_error', `errprint(`NSC error: $1
 ')m4exit(1)')
 
-# Default values of parameters and user configuration
+# Default values of parameters
 
 define(`NAMED_RESTART_CMD', `ndc reload')
 
-define(`BIND_OPTIONS', `       # Other options can be added here via macro BIND_OPTIONS')
+define(`BIND_OPTIONS', `       # Other options can be added here via macro `BIND_OPTIONS'')
 
 define(`ROOT', `/etc/named')
 define(`CFDIR', `cf')
@@ -101,4 +105,10 @@ define(`NSNAME', translit(esyscmd(`hostname -f'),`
 ',`'))
 define(`MAINTNAME', `root'.`nsc_corr_dot(NSNAME)')
 
+# And finally we change comments to semicolons to be compatible with the zone files
+
+changecom(;)
+
+; User-defined parts of configuration
+
 include(CFDIR/config)