On 12/24/06, David Relson <[EMAIL PROTECTED]> wrote:
On Sun, 24 Dec 2006 12:09:13 +0000
Mick wrote:

...[snip]...
> > Now, I'm curious!  On my system, I see the following:
> >
> >   dnsdomainname     osagesoftware.com
> >   hostname          osage.osagesoftware.com
> >   hostname --fqdn   osage.osagesoftware.com
> >
> > /etc/hosts contains:
> >
> >   192.168.1.10 osage.osagesoftware.com osage
> >
> > "strace -feopen" shows that /etc/hosts is opened by "hostname
> > --fqdn" but not "hostname".
> >
> > What have I got wrong?
> >
> > Regards,
> >
> > David
> >
> > P.S.  Greetings from one Kiewit alumni to another ...
>
> I discovered that the order of entries on the localhost line is
> important to avoid hostname being identified as "none".  I suppose in
> your system it should be:
>
> 127.0.0.1     osage.osagesoftware.com osage localhost

Curiouser and curiouser...

Using your suggested line as the complete content of my /etc/hosts file
has _no_ effect at all.

As an experiment, I tried modifying /etc/conf.d/hostname to have just
a test name, i.e. osagexxx, and restarting /etc/init.d/hostname. My
system was not at all happy with that.

### hostname ; hostname -s ; hostname --fqdn ; dnsdomainname

osagexxx
hostname: Unknown host
hostname: Unknown host
dnsdomainname: Unknown host

As the OP, I checked this out.

Right now, the first two non-comment lines in /etc/hosts are
127.0.0.1       localhost
64.166.164.49 treat.kosmanor.com treat

Adding stuff to the localhost line has no effect.
Fooling with the 64...... line does.  The first thing after the IP
seems to be taken as the
FQDN by "hostname --fqdn", so the order on the line is important.

Neither of these affects the results of "hostname", although I did not
reboot to test the
theory that this might make a difference.  It seems more likely this comes from
/etc/conf.d/hostname

++ kevin

--
Kevin O'Gorman, PhD
--
gentoo-user@gentoo.org mailing list

Reply via email to