From: Andreas Busse (andy@resi.waldorf-gmbh.de)
Date: 06/30/93


From: andy@resi.waldorf-gmbh.de (Andreas Busse)
Subject: Re: hostname (net-2) cannot find hostname.
Date: 30 Jun 1993 12:11:30 GMT

In article <wDmKsAKGBh107h@dudes.surfcty.com>, chris@dudes.surfcty.com (Chris Johnston) writes:
|> Hi there!
|>
|> After Robert Baruch was so kind as to offer me words of advice,
|> I installed the net-2 stuff under pl10 as he outlined. Now,
|> my hostname program cannot find hostname blah
|>
|> I have a file /etc/HOSTNAME that contains one line with the name
|> surfcty in it. I modified the /etc/rc.local file to have
|> the statement hostname -vS in hopes that it would find the
|> hostname from the right file. Now, my prompt says (none) and
|> if you run hostname by itself, it says (none) as well.
|>
|> What have I done?
|>
|> To make matters worse, I haven't a recent backup (my own fault).
|>
|> Of course, since hostname is not doing it's thing, hostcvt.build
|> cannot put things together properly. And since that cannot happen,
|> I cannot talk to anything else (anymore).
|>
|> Anyone with words of wisdom are asked (begged) to respond.
|>
|> Chris
|>
|> --

This isn't new. Make sure have /etc/host.conf like this:

order hosts,bind
multi

Your /etc/hosts should look like this

xxx.xxx.xxx.xxx <your hostname>

If it's still not working, get net-010.tar. You'll find the sources of /bin/hostname.
Comment out the gethostbyname() call near the end of hostname.c.
Compile, install, try again. It should work now.

Andy