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: Wed, 31 Aug 2016 21:24:32
Message-Id: 54e3996b-6667-12ad-7a43-e08fcf95d1b5@gentoo.org
In Reply to: Re: [gentoo-dev] rfc: /etc/hostname on gentoo by William Hubbs
1 On 08/28/2016 11:15 AM, William Hubbs wrote:
2 > Ok all,
3 >
4 > here is what openrc-0.22 is going to do in terms of setting the host
5 > name.
6 >
7 > If /etc/hostname exists, the first word of that file will be used as the
8 > host name.
9 > Otherwise, if the value is set in /etc/conf.d/hostname it will be used.
10 > Otherwise, OpenRC will not touch the hostname.
11 >
12 > One advantage of this, on Linux, is that you can set your host name in
13 > the kernel and this setting will be respected.
14 >
15 > Also, this means the script by default can run in containers if they
16 > allow overriding the hostname inside the container.
17 >
18 > William
19 >
20 I didn't see anyone else reply to this so I will. I think that's the
21 best way of supporting both without requiring (much) putzing around. If
22 a user changes /etc/conf.d/hostname and it doesn't change, the fix would
23 be to delete (or update) /etc/hostname and all is good in the world again.
24
25 Supporting kernel-level hostname as a side effect is even better. No
26 complaints here!
27
28 --
29 Daniel Campbell - Gentoo Developer
30 OpenPGP Key: 0x1EA055D6 @ hkp://keys.gnupg.net
31 fpr: AE03 9064 AE00 053C 270C 1DE4 6F7A 9091 1EA0 55D6

Attachments

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