X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=m4%2Fnsc.m4;h=aa2d4d98381f926cda871891cd9e64e9b27bc265;hb=e71dc5ff75ffd595bf84ec59a69a8e19c2e4df72;hp=ad6fa7697806100823034475b86e753eebd357cb;hpb=ad59bf15d0e8a781477a25f69b97f7d4c9eb0e00;p=nsc-5.git diff --git a/m4/nsc.m4 b/m4/nsc.m4 index ad6fa76..aa2d4d9 100644 --- a/m4/nsc.m4 +++ b/m4/nsc.m4 @@ -1,8 +1,8 @@ dnl ### dnl ### NSC -- Zone File Generator -dnl ### (c) 1997--2003 Martin Mares +dnl ### (c) 1997--2008 Martin Mares dnl ### -dnl ### Usage: m4 nsc.m4 domain-source-files >zone-file -DVERS=path-to-version-file +dnl ### Usage: m4 -DVERS=path-to-version-file nsc.m4 domain-source-files >zone-file dnl ### include(m4/dnslib.m4) @@ -29,10 +29,7 @@ define(nsc_abs_name, `ifelse(CURRENT_NAME, translit(CURRENT_NAME,.,:), CURRENT_N # SOA record -define(nsc_SOA, `divert; Primary file for the CURRENT_DOMAIN domain -; Generated by NSCVER (nsc.m4) on CURRENT_DATE -; Please do not edit manually - +define(nsc_SOA, ` $ORIGIN CURRENT_DOMAIN $TTL MINTTL nsc_emit_name `SOA' nsc_corr_dot(NSNAME) MAINTNAME ( @@ -120,7 +117,15 @@ define(HI, `nsc_emit_name HINFO "$1" "$2"') define(nsc_ALIAS, `$1 `CNAME' CURRENT_NAME ') -define(ALIAS, `nsc_iterate(`nsc_ALIAS', $@)dnl') +define(ALIAS, `nsc_iterate(`nsc_ALIAS', $@)nsc_set_name(CURRENT_NAME)dnl') + +# TXT records + +define(TXT, `nsc_emit_name `TXT' "$1"') + +# RP (responsible person) records + +define(RP, `nsc_emit_name `RP' nsc_corr_dot($1) nsc_corr_dot($2)') # CNAME records @@ -139,6 +144,13 @@ define(REVBLOCK, `nsc_forloop(`i', $2, $3, `i' `CNAME' `i'.$1 # Cleanup actions define(nsc_cleanup, `ifdef(`DISABLE_LOCALHOST',,` +; Added automatically (required by RFC 1912) localhost A 127.0.0.1 ')') m4wrap(`nsc_cleanup') + +divert(0)dnl +`;;;' Primary zone file +`;;;' Generated by NSCVER (nsc.m4) on CURRENT_DATE +`;;;' Please do not edit manually +`'