Why don't my $INCLUDE control statements work?
Answered Sun, 28 Jul 2002> I have a number of zones that are very similar. I have tried to put the similar
> parts into included files under bind 9.2.1. However, a zonefile that works
> fine as a singlemonolithic file produces loading errors when it is loaded as a series
> of includes. I beleive most of these problems are hinging arround origin, and the
> soa.
>
> I can get
>
> $ORIGIN .
> @ IN SOA ns.nszone.com. postmaster.nszone.com. (
> YYYYMMDD##
> 21600
> 3600
> 1382400
> 86400
> )
This is wrong. This SOA record is attached to the root, and it needs to be
attached to the domain name of the zone. If you remote the line "$ORIGIN ."
it should work.
> $ORIGIN myzone.com.
> $INCLUDE comon.inc
> $INCLUDE specifi.inc
>
> to work fine (although it is not exactly happy that the $TTL directive is
> in common.inc
Why not put the $TTL control statement before the SOA record?
> I do not understand why I need any of the ORIGIN records as I though
> $ORIGIN myzone.com. was assumed if nothing was provided.
"$ORIGIN @" is the default. You don't need the $ORIGIN control
statements--and the first one is causing you problems.
> My SOA records are also common. But moving the SOA into an include
> generates an assortment of errors. The errors are different depending on exactly
> which $ORIGIN statements are where but they tend to either be unknown or bad
> owner or out of zone data.
Yup. So take out the $ORIGIN control statements.
> regardless $INCLUDE cannot be working as a simple text include, some kind
> of presumptions are overiding the statements and directives that are
> explicitly present and I have no idea how to figure out what they are.
It does just interpolate a file.
cricket



