BIND - Declare variable?

Mike Cavanagh mike at terrapintesting.com
Fri Nov 5 15:22:37 UTC 2010


Chris.  Thanks for the confirmation.  Just wanted to make sure I did not
miss something.

Yes.  You suggestion would work.  But, I will leave things as is.  It's
straight forward and easy for someone else to follow.

Thanks again,

Mike.

 

Michael D. Cavanagh
Phone [916] 853-9658

________________________________

The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, transmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited and may be
unlawful.  If you received this in error, please notify the sender and
delete the material from your system.
P THINK GREEN.  Please consider the environment before printing this
e-mail notice.



________________________________

From: Chris Buxton [mailto:chris.p.buxton at gmail.com] 
Sent: Thursday, November 04, 2010 11:16 PM
To: Mike Cavanagh
Cc: bind-users at lists.isc.org
Subject: Re: BIND - Declare variable?

 

No. You can set a path in named.conf with the options { directory ...;
}; statement, but that single path applies to all unqualified paths in
named.conf.

 

You could, however, write this:

 

options {

            directory "/var/named";

};

 

logging {

            channel config_log {

                        file "log/config" [...];

            };

            channel database_log {

                        file "log/database" [...];

            };

};

 

Your directory structure might include a symlink at /var/named/log
pointing to /var/log/dns.

 

Regards,

Chris Buxton

BlueCat Networks

 

On Nov 3, 2010, at 11:13 AM, Mike Cavanagh wrote:





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

 

_______________________________________________
bind-users mailing list
bind-users at lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users

 

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


More information about the bind-users mailing list