h2n 2.38
Kevin Darcy
kcd at daimlerchrysler.com
Thu Jun 14 18:34:05 UTC 2001
Okay, time for me to get on my soapbox again...
IF YOUR NEEDS ARE THAT COMPLEX YOU SHOULDN'T BE
BUILDING DNS FROM A HOSTS FILE ANYWAY!!!
While I certainly respect h2n as a *migration* aid, I see many admins using it
as a crutch long after they should have made DNS their central repository for
hostname information. They hang onto their hosts files like it's some sort of
security blanket or favorite teddy-bear. GROW UP! Time to bite the bullet and
live in the DNS-centric world. You'll be glad when you take the plunge. Trust
me, I made that transition years ago and never regretted it.
I think that's enough capital lettes and mixed metaphors. Back to your
regularly-scheduled mailing list...
- Kevin
Andris Kalnozols wrote:
> > Rick Veenstra wrote:
> >
> > Another question about h2n.
> > Previously we used hosts_to_named, a HP-provided shell script, to convert
> > hosts files to bind 4.x db and config files. We are using a (generated)
> > hosts file containing only fully qualified domain names from several
> > domains. With hosts_to_named it was possible to generate data for several
> > domains in one run, with a resulting named.boot containing references to
> > all these domains. With h2n I have not (yet) managed to do this, since it
> > only accepts one domain name with the -d option.
>
> Enhancing h2n to be able to build multiple forward-mapping zones
> at a time is something that a lot of users would like to see.
> I'm taking a look at the time/space trade-offs that are involved
> in changing the data structures to make this feature possible.
>
> > Creating these files in more than one run results in an incomplete
> > named.conf; it appears that h2n removes all references to zones that
> > are not specified. Is this correct or am I missing something?
>
> Correct. One way to reassemble the pieces would be to use a
> different '+c' option for every run of h2n, e.g.,
>
> '+c named.conf'
> '+c named.conf.1'
> '+c named.conf.2'
> etc.
>
> Afterwards, append the relevant zone declarations in files 1-N
> to the main file like so:
>
> #!/usr/bin/ksh
> #
> for zones in named.conf.+([0-9])
> do
> # Remove the common initial lines containing the 'options'
> # statement plus the hint and loopback 'zone' statements.
> #
> sed -e '1,/db.127.0.0/d' $zones >> named.conf
> done
>
> Hope this helps.
>
> Andris Kalnozols
> Hewlett-Packard Laboratories
> andris at hpl.hp.com
More information about the bind-users
mailing list