Gentoo Archives: gentoo-dev

From: Martin Vaeth <martin@×××××.de>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: rfc: /etc/hostname on gentoo
Date: Wed, 24 Aug 2016 08:02:27
Message-Id: slrnnrql3t.5s6.martin@lounge.imp.fu-berlin.de
In Reply to: Re: [gentoo-dev] rfc: /etc/hostname on gentoo by William Hubbs
1 William Hubbs <williamh@g.o> wrote:
2 >
3 > I am planning to change the logic in /etc/init.d/hostname so that if
4 > /etc/hostname exists, the first word out of that file will be used as
5 > the hostname rather than any setting in /etc/conf.d/hostname.
6
7 You could also make the content of the default /etc/conf.d/hostname:
8
9 hostname=`cat /etc/hostname`
10
11 or
12
13 read hostname </etc/hostname
14
15 or something similar. This way, the change becomes transparent to the user
16 and he can easily change it if he prefers the old logic for some reason.