Gentoo Archives: gentoo-dev

From: William Hubbs <williamh@g.o>
To: gentoo-dev@l.g.o
Cc: Christian Kniep <ckniep@××××××.com>
Subject: Re: [gentoo-dev] rfc: /etc/hostname on gentoo
Date: Tue, 23 Aug 2016 19:58:22
In Reply to: Re: [gentoo-dev] rfc: /etc/hostname on gentoo by Rich Freeman
1 On Tue, Aug 23, 2016 at 02:45:20PM -0400, Rich Freeman wrote:
2 > Symlinking /proc into /etc/hostname is still useful because it not
3 > only handles container hostnames (keep in mind that two containers
4 > could share the same /etc), but it also covers cases where the
5 > hostname changes, and it doesn't require writing to etc (which in
6 > general shouldn't be used to store state).
7 >
8 > The people who are saying /etc/hostname shouldn't really exist are
9 > completely right. However, if for whatever reason we did want to
10 > provide it for compatibility (just like mtab), then a symlink to /proc
11 > at least ensures it returns the same answer as the system call.
13 My understanding of /etc/hostname is it is a widely used standard for
14 storing the name of the host and it is used to set the name of the host
15 on bootup. I just ran a google search of /etc/hostname, and it gets a
16 number of hits.
18 Here is what I'm looking at in OpenRC:
20 I am planning to change the logic in /etc/init.d/hostname so that if
21 /etc/hostname exists, the first word out of that file will be used as
22 the hostname rather than any setting in /etc/conf.d/hostname. If you
23 don't want /etc/hostname, just don't create it and the settings from
24 /etc/conf.d/hostname will still be used.
26 It turns out this has nothing to do with the Docker situation I brought
27 up. Whether or not a docker container should be able to access the
28 hostname of the host it is running on is a separate question.
30 William


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


Subject Author
Re: [gentoo-dev] rfc: /etc/hostname on gentoo Rich Freeman <rich0@g.o>
Re: [gentoo-dev] rfc: /etc/hostname on gentoo Daniel Campbell <zlg@g.o>
[gentoo-dev] Re: rfc: /etc/hostname on gentoo Martin Vaeth <martin@×××××.de>