Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'd like to have all my zone files in a few directories (let's just stick with the idea that I can't know how many directories will be there nor what name will they have) and make BIND include them all. (not recursive, just zone files in first folder)

In other words, is something like this possible?

options {
    directory "/var/bindconf/*";
}

With a folder structure like:

/var/bindconf/folderA/my_zone_file.conf
/var/bindconf/folderB/my_zone_file_1.conf
/var/bindconf/folderB/my_zone_file_2.conf
/var/bindconf/folderC/my_zone_file_1.conf
/var/bindconf/folderC/my_zone_file_2.conf
/var/bindconf/folderC/my_zone_file_3.conf

Regards

share|improve this question

1 Answer 1

up vote 3 down vote accepted

According to the Bind documentation, no:

include Statement Grammar

include filename;

include Statement Definition and Usage

The include statement inserts the specified file at the point where the include statement is encountered. The include statement facilitates the administration of configuration files by permitting the reading or writing of some things but not others. For example, the statement could include private keys that are readable only by the name server.

The same thing applies in the options directive:

directory

The working directory of the server. Any non-absolute pathnames in the configuration file will be taken as relative to this directory. The default location for most server output files (e.g. named.run) is this directory. If a directory is not specified, the working directory defaults to `.', the directory from which the server was started. The directory specified should be an absolute path.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.