h2n Script Doesn't Create Default TTL Record

Kevin Darcy kcd at daimlerchrysler.com
Thu Sep 14 22:21:49 UTC 2000


Why even maintain the name data in /etc/hosts at all? Seems like it makes more
sense to maintain the data in DNS zone files directly or using Dynamic Update.
Then, if you still even need an /etc/hosts file, you can always cobble together
a simple script to generate one from the zone files. And this "n2h" script
would probably be a whole lot simpler than h2n, since it doesn't need to worry
about incrementing serial numbers and whatnot.


- Kevin

nick at glimmer.demon.co.uk wrote:

> [following up my own posting]
> On 12 Sep 2000 21:18:11 -0700, nick at glimmer.demon.co.uk (Nick Boyce) wrote:
>
> >I'm using the Oreilly/Cricket h2n script to generate my zone files from a
> >hosts file, and it doesn't generate the $TTL records - unless I've missed
> >some commandline switch that does that.
> >
> >I could build a simple edit to add the records into the wrapper script I
> >use with h2n, but after playing around I also notice that if you put a $TTL
> >record into each db.* file manually, then on subsequent runs of h2n it
> >complains that each file has an invalid SOA record, and falls over - so I
> >have to take the $TTL records out first, then run h2n, then put them back
> >in ...
>
> Several helpful folks emailed me direct, and Andris Kalnozols pointed me at
> a later much more sophisticated h2n which does create $TTL records.  Thanks
> for that Andris - I've tried it, and it did create the $TTLs, but I had
> other problems with it which I'll email you about (it didn't like the
> contents of my /etc/hosts file !); I assume this is a proposed contrib tool
> for BIND 9, and maybe a bit beta - it certainly did a lot of new things.
>
> >Weird !?   Why does h2n even *look* at the previous contents of the db.*
> >files ?
>
> Everyone who replied pointed out what I should have realised, which is that
> h2n needs to find out the previous SOA serial no. so it can increment it.
> Thanks - that was stupid of me.
>
> I'm still wondering whether I should submit a bug to someone about the fact
> that current (8.2.2p5) h2n chokes and dies if a zone file *has* a $TTL
> record ...
>
> Nick Boyce
> Bristol, UK
> --
> Turnaucka's Law:
> The attention span of a computer is only as long as its electrical cord.






More information about the bind-users mailing list