Amend named.conf
Josef Moellers
jmoellers at suse.de
Wed Oct 28 09:58:21 UTC 2020
On 28.10.20 10:29, Lars-Johan Liman wrote:
> Josef Moellers <jmoellers at suse.de> wrote:
>>> Is there a way to add something, eg a "plugin" specification, to
>>> bind/named's configuration WITHOUT adding it to named.conf, but rather
>>> to a file/directory which is sourced in addition to named.conf?
>
> dot at dotat.at 2020-10-27 13:49 [+0000]:
>> Use the `include` directive:
>> https://downloads.isc.org/isc/bind9/cur/9.16/doc/arm/html/reference.html#include-statement-grammar
>
>> You can only include a specific file: it doesn't support globbing or .d
>> style config directories.
>
> ... but if you allow yourself (or your system) to edit the included
> file, it can in turn list the files that you want included, like so:
>
>
> named.conf:
> ...
> ...
> include "include-files.inc";
> ...
>
>
> include-files.inc:
> ...
> ...
> include "my-first-additions.inc";
> include "my-second-additions.inc";
> include "my-third-additions.inc";
> ...
>
> But globbing and/or a conf.d/ would indeed be nice. :-)
Strangely enough the "BIND 9 Administrator Reference Manual" has this:
"(or files if a valid glob expression is detected" (Section 4.2.6).
Yes. it would be nice to have. It could extend the existing mechanism as
follows:
* If the argument to the "include" statement is a glob, it is first
expanded to all entries that satisfy the glob (eg using glob())
* If the (expanded) argument specifies a file, it includes the file
* If the (expanded) argument specifies a directory all files in the
directory are included (recursively?)
Would it make sense to implement this (if I find the time, but I must
add that I'm not that good in writing OS-independent code)?
Josef
--
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5
90409 Nürnberg
Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
More information about the bind-workers
mailing list