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 A2C6C138330 for ; Tue, 23 Aug 2016 19:58:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 10105E0B57; Tue, 23 Aug 2016 19:58:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 1241AE0B3A for ; Tue, 23 Aug 2016 19:58:12 +0000 (UTC) Received: from localhost (unknown [100.42.103.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: williamh) by smtp.gentoo.org (Postfix) with ESMTPSA id D380433BEE9; Tue, 23 Aug 2016 19:58:11 +0000 (UTC) Date: Tue, 23 Aug 2016 14:57:46 -0500 From: William Hubbs To: gentoo-dev@lists.gentoo.org Cc: Christian Kniep Subject: Re: [gentoo-dev] rfc: /etc/hostname on gentoo Message-ID: <20160823195746.GA21460@whubbs1.gaikai.biz> Mail-Followup-To: gentoo-dev@lists.gentoo.org, Christian Kniep References: <20160822155808.GA16219@whubbs1.gaikai.biz> <1471894124.32381.0.camel@gentoo.org> <20160822220925.GB18116@whubbs1.gaikai.biz> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Archives-Salt: b78859b8-d3d5-429f-b12f-97da9773c088 X-Archives-Hash: 9de31cb7c255bad6471ce93e6d066d0d --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 23, 2016 at 02:45:20PM -0400, Rich Freeman wrote: > Symlinking /proc into /etc/hostname is still useful because it not > only handles container hostnames (keep in mind that two containers > could share the same /etc), but it also covers cases where the > hostname changes, and it doesn't require writing to etc (which in > general shouldn't be used to store state). >=20 > The people who are saying /etc/hostname shouldn't really exist are > completely right. However, if for whatever reason we did want to > provide it for compatibility (just like mtab), then a symlink to /proc > at least ensures it returns the same answer as the system call. My understanding of /etc/hostname is it is a widely used standard for storing the name of the host and it is used to set the name of the host on bootup. I just ran a google search of /etc/hostname, and it gets a number of hits. Here is what I'm looking at in OpenRC: I am planning to change the logic in /etc/init.d/hostname so that if /etc/hostname exists, the first word out of that file will be used as the hostname rather than any setting in /etc/conf.d/hostname. If you don't want /etc/hostname, just don't create it and the settings from /etc/conf.d/hostname will still be used. It turns out this has nothing to do with the Docker situation I brought up. Whether or not a docker container should be able to access the hostname of the host it is running on is a separate question. William --8t9RHnE3ZwKMSgU+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAle8qrQACgkQblQW9DDEZTj5sQCdHYlms+x/yjvXTWAPQwS57vAX ZjUAoI9s2gXYxILkkz4hwkaNCnp4W2Hr =xF8L -----END PGP SIGNATURE----- --8t9RHnE3ZwKMSgU+--