Gentoo Archives: gentoo-dev

From: William Hubbs <williamh@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] rfc: /etc/hostname on gentoo
Date: Mon, 22 Aug 2016 17:04:19
Message-Id: 20160822170342.GA16554@whubbs1.gaikai.biz
In Reply to: Re: [gentoo-dev] rfc: /etc/hostname on gentoo by Rich Freeman
1 On Mon, Aug 22, 2016 at 12:39:03PM -0400, Rich Freeman wrote:
2 > On Mon, Aug 22, 2016 at 12:11 PM, M. J. Everitt <m.j.everitt@×××.org> wrote:
3 > > On 22/08/16 16:58, William Hubbs wrote:
4 > >>
5 > >> it looks like app-emulation/docker expects /etc/hostname to exist.
6 > >>
7 > >> On Gentoo, this file does not exist, so I'm wondering how we can make it
8 > >> exist?
9 > >>
10 > >> I know in OpenRC I can read it and use the value there as the hostname
11 > >> instead of /etc/conf.d/hostname if it exists,but I'm not sure whether
12 > >> OpenRC should populate /etc/hostname if it does not exist or whether
13 > >> something else should do that.
14 > >>
15 > > Sym-link it perhaps? Making another file could make synchronisation, etc
16 > > a headache....
17 > >
18 >
19 > Systemd has generally been going the route of symlinking files like
20 > these to files in /run. That might be an approach that would work for
21 > openrc as well. It also eliminates giving write-access to /etc to
22 > things like dhcpd.
23
24 I'm not sure about putting this in /run for a couple of reasons:
25
26 The contents of this file is a setting, like /etc/conf.d/hostname, which
27 will be set by the user.
28
29 The other reason is, I don't know enough about containers to know if
30 they will have a separate /run from the host.
31
32 William

Attachments

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

Replies

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