Gentoo Archives: gentoo-dev

From: Daniel Campbell <zlg@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] rfc: /etc/hostname on gentoo
Date: Tue, 23 Aug 2016 06:40:14
Message-Id: f0c3961d-35e4-2e35-5ccd-24ba20048815@gentoo.org
In Reply to: Re: [gentoo-dev] rfc: /etc/hostname on gentoo by William Hubbs
1 On 08/22/2016 03:09 PM, William Hubbs wrote:
2 > On Mon, Aug 22, 2016 at 09:28:44PM +0200, Hans de Graaff wrote:
3 >> On Mon, 2016-08-22 at 10:58 -0500, William Hubbs wrote:
4 >>> All,
5 >>>
6 >>> it looks like app-emulation/docker expects /etc/hostname to exist.
7 >>
8 >> Is there a bug for this? docker seems to work fine for me on a system
9 >> without this file present.
10 >
11 > Ok, now for the clarification.
12 >
13 > Someone here at the office was wanting a cross-platform way to find out
14 > the hostname of the host the container is running on inside the
15 > container. We made another suggestion for that, so forget about the
16 > docker angle on this for now.
17 >
18 > But, /etc/hostname is a multi-distro standard for where the hostname is
19 > located, so I would like to make openrc prefer it over the setting in
20 > /etc/conf.d/hostname if it exists.A
21 >
22 > I suppose whether we populate it by default might be a separate
23 > question.
24 >
25 > William
26 >
27 Changing the way one configures the hostname because one or a few
28 packages A) need this knowledge, and B) hardcode /etc/hostname is not
29 worth changing the canonical way to update it and getting people to
30 change their habits.
31
32 It makes a bit more sense to rely on previous configuration
33 (/etc/conf.d/hostname) and write a tiny 'script' that populates
34 /etc/hostname. bash could do it (naively) in two lines:
35
36 source /etc/conf.d/hostname
37 echo "$hostname" > /etc/hostname
38
39 The 'multi-distro standard' is du jour at best and imo not a compelling
40 reason to follow.
41
42 --
43 Daniel Campbell - Gentoo Developer
44 OpenPGP Key: 0x1EA055D6 @ hkp://keys.gnupg.net
45 fpr: AE03 9064 AE00 053C 270C 1DE4 6F7A 9091 1EA0 55D6

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] rfc: /etc/hostname on gentoo Christian Kniep <ckniep@××××××.com>
Re: [gentoo-dev] rfc: /etc/hostname on gentoo Rich Freeman <rich0@g.o>