Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!ATHENA.MIT.EDU!tytso From: tytso@ATHENA.MIT.EDU (Theodore Ts'o) Newsgroups: comp.protocols.tcp-ip.domains Subject: Re: Building /etc/hosts from DNS anyone? Message-ID: <9106062020.AA00536@tsx-11.MIT.EDU> Date: 6 Jun 91 20:20:01 GMT References: <9106052021.AA29681@mickey.ycc.yale.edu> Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: tytso@athena.mit.edu Distribution: inet Organization: The Internet Lines: 28 Date: Wed, 5 Jun 91 16:21:24 EDT From: What we do instead is build both from a "local.txt" file, kept in the format specified by RFC 952. The original tool to do this was a big awk/sed/grep/shell script written by Morrow Long here. I've been working on a replacement written in perl. Although it is a few details short of generating correct DNS source files, this project has clearly demonstrated to me that perl is the right tool for this kind of job. Same here, although what I've done is modify the standard Berkeley "htable" program to spit out the main body of the DNS zone files (mit.zone and mit.rev). I also wrote up a set of scripts and a Makefile so that all you need to do is do a "make" and a "make install", and your namespace gets updated. No muss, no fuss, no dirty dishes.... If anyone is interested, I can tar up what we have and ship it to them. Parts of it are specific to MIT, but it shouldn't be too hard to customize it for another site. - Ted P.S. The setup also has the interesting feature of having a shell script which is actually *faster* than the equivalent script written in perl. (It's a simple script which calls dc to calculate the new serial number for your SOA record.)