$GENERATE or $EXEC?

André Pirard A.Pirard at ulg.ac.be
Tue Jul 20 13:59:02 UTC 1999


Paul Vixie <vixie at mibh.net> wrote:

>"Cricket Liu" <cricket at acmebw.com> writes:
>
>> That's an interesting idea, Andre.  And with $EXEC, you could replace
>> $GENERATE with a small program and the appropriate right-hand side:
>> 
>> $EXEC /usr/sbin/named/generate 1-63 $ IN CNAME
>> $.0-63.0.168.192.in-addr.arpa.
>> 
>> I guess someone would have to publish a new RFC extending the current
>master
>> file format to include $EXEC, too.
>
>sorry to rain on the parade, but i'm going to resist putting this feature in
>for the same reason i ended up resisting putting in read-zone-from-pipe (as an
>alternate to "file ..." in "master" zones): there is no way to know from within
>the server that reading the zone over again could have a different result. in
>the pure "file"/$INCLUDE model there is a way -- the stat() posix call -- to
>know that the zone ought to be reread.  if we use pipes, either at the config
>file level or zone ($EXEC) level then we need a separate program that just
>gives back the current SOA, or mtime, or whatever.  or we need standardized
>arguments to the program so if it's called with "-justsoa" it has different
>output.  this whole area is ripe for research but nowhere near development,
>even advanced development.  (note that $INCLUDE currently isn't graphed and
>we automatically assume that the zone could have changed if $INCLUDE is used;
>this is however an implementation fault rather than a design fault.)
>
>so at the moment i have to suggest that $EXEC be done in a perl or m4 pipeline
>outside of the server.  $GENERATE is at least static with regard to stat()'s
>reported mtime.

You made very valid points (of course :-)), which I had missed.
My long dated idea was an $EXEC like feature for the configuration
file only and I picked on a $GENERATE discussion to extend the idea.

So let's get back to the basic example 'exec <filename> master|slave'
in a configuration file stub with <filename> such as

subroutine myzone: if master then gen_master else gen_slave ;
myzone <name-0>;
...
myzone <name-n>;

It would be more appealing to have BIND exec such a self-contained
file than to have to remember to preprocess one differently on each
server.

Thanks for all the nice work and best regards,




More information about the bind-users mailing list