public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Todd Goodman <tsg@bonedaddy.net>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] hostname problem : solved
Date: Tue, 4 Oct 2016 08:27:10 -0400	[thread overview]
Message-ID: <20161004122710.GH7108@ns1.bonedaddy.net> (raw)
In-Reply-To: <20161004000402.GG1705@ca.inter.net>

* Philip Webb <purslow@ca.inter.net> [161003 20:04]:
> 161002 Philip Webb wrote:
> > 161002 Hinnerk van Bruinehsen wrote:
> >> On Sun, Oct 02, 2016 at 07:41:48AM -0400, Philip Webb wrote:
> >>> I did a big system update yesterday ( 52 pkgs ), incl Net-tools Dhcpcd ,
> >>> & on restarting today found that hostname is not being set :
> >> Check if sys-apps/net-tools has the "hostname" useflag enabled
> >> it's enabled by default so you may encounter the fallout of a -* setup.
> > Yes, that was it (red face).  Thanks for the prompt reply.
> 
> Wanting to make a note for the future in case this happens again,
> I have written :
> 
>   Hostname set by  /etc/init.d/hostname :
>     the binary  /bin/hostname  is provided by Net-tools + USE="hostname" ;
>      hostname  needs to be set to  localhost  to make apps work properly :
>     this is done via  /etc/hosts ,
>      wh belongs to Baselayout & shd contain '127.0.0.1 localhost' ;
>     there is also  /etc/conf.d/hostname ,
>      wh belongs to Openrc & contains 'hostname="localhost"'.
> 
> However, I'm now wondering whether/why the system needs both
>  /etc/hosts  +  /etc/conf.d/hostname , which seem to do the same thing.
> Can anyone explain ? 

I can't speak to why there are multiple ways to do things (just
different ways carried forward I think.)

But recently a change (to OpenRC I believe) requires the line in
/etc/conf.d/hostname to have the environment variable capitalized to be
used.

In your example it needs to contain "HOSTNAME=localhost" and not
"hostname=localhost"

I had one fairly recently installed server run into this problem (and
not my other servers.)

I run ~amd64

Todd


  parent reply	other threads:[~2016-10-04 12:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-02 11:41 [gentoo-user] hostname problem Philip Webb
2016-10-02 11:47 ` Hinnerk van Bruinehsen
2016-10-02 11:56   ` Mick
2016-10-02 12:06   ` [gentoo-user] hostname problem : solved Philip Webb
2016-10-04  0:04     ` Philip Webb
2016-10-04  4:01       ` [gentoo-user] " Ian Zimmerman
2016-10-04 15:23         ` Philip Webb
2016-10-04 12:27       ` Todd Goodman [this message]
2016-10-04 15:19         ` [gentoo-user] " Philip Webb
2016-10-04 15:42           ` William Hubbs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161004122710.GH7108@ns1.bonedaddy.net \
    --to=tsg@bonedaddy.net \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox