From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 33C6A138330 for ; Tue, 4 Oct 2016 12:27:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 26539E0BEC; Tue, 4 Oct 2016 12:27:12 +0000 (UTC) Received: from ns1.bonedaddy.net (ns1.bonedaddy.net [70.91.141.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CE1B9E0BC6 for ; Tue, 4 Oct 2016 12:27:11 +0000 (UTC) Received: from ns1.bonedaddy.net (ns1.bonedaddy.net [192.168.1.4]) by ns1.bonedaddy.net (8.14.9/8.14.4) with ESMTP id u94CRAlJ022810 for ; Tue, 4 Oct 2016 08:27:10 -0400 Date: Tue, 4 Oct 2016 08:27:10 -0400 From: Todd Goodman To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] hostname problem : solved Message-ID: <20161004122710.GH7108@ns1.bonedaddy.net> References: <20161002114148.GA1808@ca.inter.net> <20161002114710.kvwtki4ckeyh4x6t@Securitron.fritz.box> <20161002120651.GA1706@ca.inter.net> <20161004000402.GG1705@ca.inter.net> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161004000402.GG1705@ca.inter.net> User-Agent: Mutt/1.7.0 (2016-08-17) X-Archives-Salt: da3ccc65-4ede-4378-86f0-30581ec58b10 X-Archives-Hash: 7e7e22e4af330a2d7c2ce8c0bf8fe55e * Philip Webb [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