-define(`DISABLE_LOCALHOST', 1)
-divert(0)dnl
; Recommended contents of blackhole zones as per RFC 6303
; However, we need to set the NS record to our address,
; since otherwise BIND complains.
-`@ 10800 IN SOA' NSNAME. nobody.invalid. 1 3600 1200 604800 10800
-`@ 10800 IN NS' NSNAME.
+define(`DISABLE_LOCALHOST', 1)
+define(`MAINTNAME', `nobody.invalid.')
+define(`REFRESH', 3600)
+define(`RETRY', 1200)
+define(`EXPIRE', 604800)
+define(`MINTTL', 10800)
+
+SOA(@)
+NS(NSNAME)
-define(`DISABLE_LOCALHOST', 1)
-divert(0)dnl
; Recommended contents of blackhole zones as per RFC 6303
; However, we need to set the NS record to our address,
; since otherwise BIND complains.
-`@ 10800 IN SOA' NSNAME. nobody.invalid. 1 3600 1200 604800 10800
-`@ 10800 IN NS' NSNAME.
+define(`DISABLE_LOCALHOST', 1)
+define(`MAINTNAME', `nobody.invalid.')
+define(`REFRESH', 3600)
+define(`RETRY', 1200)
+define(`EXPIRE', 604800)
+define(`MINTTL', 10800)
+
+SOA(@)
+NS(NSNAME)
# Last words
-define(`nsc_cleanup', `divert(0)VERSDIR/.version: CFDIR/domains ROOTCACHE`'PRIMARIES`'ifdef(`NEED_BLACKHOLE',` ZONEDIR/blackhole')
+define(`nsc_cleanup', `
+ifdef(`NEED_BLACKHOLE', `PRIMARY(blackhole)')
+
+divert(0)VERSDIR/.version: CFDIR/domains ROOTCACHE`'PRIMARIES`'ifdef(`NEED_BLACKHOLE',` ZONEDIR/blackhole')
NAMED_RESTART_CMD
touch VERSDIR/.version
-ifdef(`NEED_BLACKHOLE', `
-ZONEDIR/blackhole: CFDIR/blackhole $(DDEPS)
- `$'(`M4') $(NSC) $< >`$'@
')dnl
clean:
# Version number
-ifdef(`VERS',`
+ifdef(`VERS',`',`nsc_fatal_error(`VERS macro not defined')')
define(TODAY_CODE, translit(esyscmd(`date +"%Y%m%d"'),`
',`'))
ifelse(eval(SUBVER_NUM > 99),1,`nsc_fatal_error(`Too many zone changes in a single day, you must tweak 'VERS` manually')')
define(`VERSION',TODAY_CODE`'format(`%02d', SUBVER_NUM))
-',`
-define(`VERSION', 1)
-')
-
# Record names
define(nsc_set_name, `define(`CURRENT_NAME', nsc_corr_dot($1))define(`PRINT_NAME', CURRENT_NAME)')
# SOA record
define(nsc_SOA, `
-$ORIGIN CURRENT_DOMAIN
+ifelse(CURRENT_DOMAIN,@,`',$ORIGIN CURRENT_DOMAIN)
$TTL MINTTL
nsc_emit_name `SOA' nsc_corr_dot(NSNAME) MAINTNAME (
VERSION REFRESH RETRY EXPIRE MINTTL )')
define(SOA, `ifdef(`CURRENT_DOMAIN',`ifdef(`REVERSE_MODE',,`nsc_fatal_error(`SOA record defined twice')')')dnl
-define(`CURRENT_DOMAIN',$1.)dnl
+define(`CURRENT_DOMAIN',ifelse($1,@,@,$1.))dnl
nsc_set_name(CURRENT_DOMAIN)dnl
ifdef(`REVERSE_MODE',,`nsc_SOA')')