Gentoo Archives: gentoo-dev

From: Mike Gilbert <floppym@g.o>
To: Gentoo Dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] Re: rfc: /etc/hostname on gentoo
Date: Thu, 25 Aug 2016 12:50:47
Message-Id: CAJ0EP42XszrCgaJCczXUh2bBsirFtDfSM7w_3fWgqDZnMQPLXw@mail.gmail.com
In Reply to: [gentoo-dev] Re: rfc: /etc/hostname on gentoo by Duncan <1i5t5.duncan@cox.net>
1 On Thu, Aug 25, 2016 at 12:11 AM, Duncan <1i5t5.duncan@×××.net> wrote:
2 > Mike Gilbert posted on Wed, 24 Aug 2016 11:49:42 -0400 as excerpted:
3 >
4 >> On Wed, Aug 24, 2016 at 7:42 AM, Michael Orlitzky <mjo@g.o>
5 >> wrote:
6 >>> On 08/24/2016 07:37 AM, Daniel Campbell wrote:
7 >>>>
8 >>>> I imagine _someone_ out there wants it, otherwise we wouldn't be
9 >>>> discussing it.
10 >>>
11 >>> The thread started out proposing it as a solution to a docker problem
12 >>> that, it turns out, isn't a problem. Why are we still trying to fixing
13 >>> something that isn't broken? Maybe I'm losing it, but nowhere in the
14 >>> whole thread has anyone given a single reason why this might be useful.
15 >>
16 >> You're right that the orignal purpose of the change has been debunked.
17 >>
18 >> So, starting over: one real benefit would be cross-compatibility with
19 >> systemd. It's one less thing people would need to reconfigure when
20 >> migrating to/from openrc.
21 >>
22 >> And before anyone starts an argument about it, I don't care what your
23 >> opinion on systemd is. I'm just throwing this out there as an actual
24 >> benefit of adding support for /etc/hostname to openrc.
25 >
26 > Are you sure about systemd?
27
28 Yes, I am certain that systemd uses this file to set the system
29 hostname. It does *not* read /etc/conf.d/hostname, which is the main
30 point here.
31
32 > Because I'm on systemd here, working fine as far as can be observed, and
33 > I don't have /etc/hostname.
34 >
35 > [after googling and checking manpages]
36 >
37 > Seems it's (semi-?)optional. The hostnamectl command can be used to set
38 > the hostname (pretty/static/transient/or-combination-of) among other
39 > things, and /etc/hostname presumably controls the static name.
40 > But I have the (reported as transient) name set by kconfig option, and
41 > apparently that's all that's needed on my setup, anyway.
42
43 Nobody actually does this, except you and a few other Gentoo people.
44 Most kernels in the wild are compiled by distro maintainers, who have
45 no idea what you want to call your computer.
46
47 Setting the hostname via a text file in /etc is a lot simpler than
48 re-configuring a kernel.
49
50 > So it seems systemd works just fine without /etc/hostname, certainly so
51 > if it's set elsewhere, like say via kconfig option.
52
53 I never said /etc/hostname was necessary for operation of systemd.
54
55 It *is* the way that normal people set their hostname for a system
56 that doesn't get configured via DHCP or some dynamic method.

Replies

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