]> git.ipfire.org Git - thirdparty/bind9.git/commit
Allow zone names to be generated parametrically
authorEvan Hunt <each@isc.org>
Wed, 16 Apr 2025 04:17:44 +0000 (21:17 -0700)
committerEvan Hunt <each@isc.org>
Tue, 3 Jun 2025 19:03:07 +0000 (12:03 -0700)
commit598ae3f63ca973ad57ce944aae6aab9ab0480c9a
treeb3c68f9efdbb3dcda31f786c069a00d358d4eda3
parent60b129da253d72fd4b65d93f8590789ab92b8120
Allow zone names to be generated parametrically

Special tokens can now be specified in a zone "file" option
in order to generate the filename parametrically. The first
instead of "$name" in the "file" option is replaced with the
zone origin, the first instance of "$type" is replaced with the
zone type (i.e., primary, secondary, etc), and the first instance
of "$view" is replaced with the view name..

This simplifies the creation of zones using initial-file templates.
For example:

   $ rndc addzone <zonename> \
     { type primary; file "$name.db"; initial-file "template.db"
bin/tests/system/masterfile/ns2/named.conf.j2
doc/arm/reference.rst
lib/dns/zone.c
tests/dns/Makefile.am
tests/dns/zonefile_test.c [new file with mode: 0644]