Path: utzoo!attcan!uunet!munnari.oz.au!uhccux!ames!ads.com!decwrl!elroy.jpl.nasa.gov!sdd.hp.com!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!cis.ohio-state.edu!karl_kleinpaste From: karl_kleinpaste@cis.ohio-state.edu Newsgroups: comp.mail.sendmail Subject: Re: $w macro in Sun's sendmail.mx Message-ID: Date: 13 Jul 90 20:36:22 GMT References: <16010004@wdl1.UUCP> Sender: news@tut.cis.ohio-state.edu Organization: Ohio State Computer Science Lines: 25 If the problem with $w not being set properly is due to your nameserver not having fully initialized, you'll find (sooner or later) that simply waiting a little longer will not do the trick; over time, you'll almost certainly change your configuration to make it more complex (more host, more subdomains, doing secondary for other domains, that sort of thing), which will take longer to initialize, and eventually you'll get back to the same problem even if you put in a "sleep 30." A better solution is to start the nameserver and then just sit, waiting for it to be able to answer queries. There's a little piece of code called host.c writen by Chuck Hedrick/Rutgers which can be invoked like this: host -a -w localhost It makes direct queries of the nameserver for the name given, and the options tell it to ("-a") get all available info on the name, and ("-w") keep waiting and retrying the query until an answer comes back. I use "host -a -w localhost" in my rc files immediately after starting the nameserver. When I get output from host, I then go on to do the interesting stuff such as starting NFS and sendmail. You can get host from tut.cis.ohio-state.edu:pub/nameserver/host.[1c]. --karl