BIND - Declare variable?

Mike Cavanagh mike at terrapintesting.com
Wed Nov 3 18:13:26 UTC 2010


I do not think this is possible, but would like to confirm.

I would like to declar a variable, and then use that variable elsewhere
within the named.conf file.

 

I have multiple "channel" definitions with "file" options.  I want a
variable for the path so I can change it once and update all entries:

Example:

channel config_log {

file "/var/log/dns/config"

versions 7

size 20m

;

channel config_log {

file "/var/log/dns/config"

versions 7

size 20m

;

 

I would like:

FQPN=/var/log/dns

                channel config_log (

                                File "$FQPN/config"

                                                Version 7

                                                Size 20m

                                ;

channel database_log {

file "$FQPN/database"

versions 7

size 20m

;

 

Obviously, I could take it even further with the version and size
parameters.  It would be great to reduce this down to:

                FQPN=/var/log/dns

                Ch_Opts=Version 7 Size 20m

 

                channel config_log (

                                File "$FQPN/config" $Ch_Opts ;

channel database_log {

file "$FQPN/database" $Ch_Opts ;

 

Thanks,

Mike C

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/bind-users/attachments/20101103/6c219f64/attachment.html>


More information about the bind-users mailing list