'include'ing all files in a directory - has this been done?
bootc at bootc.net
Thu Jun 29 15:41:27 UTC 2006
Paul Colquhoun wrote:
> Has anybody modified BIND so that the 'include' statement in the config
> file will include all the files in a directory, if it is given a
> directory name instead of a file name?
> Something like the way that xinetd does?
> I'm working on a new BIND installation for an ISP, and this would enable
> us to have a directory full of small files, each one holding the 'zone'
> statement for a single domain. Adding and removing a domain could then
> be done by adding/removing the relevant file, without needing to modify
> the main config file each time.
> Or, to stop inadvertent includes, call it 'include-dir' so a typo wont
> have such a big, unexpected effect.
> Has this been shot down in the past as a bad idea?
I think you can simply do an 'include /foo/bar/*.conf' and it will
include all files matching the pattern.
More information about the bind-users