On 08/22/2016 03:09 PM, William Hubbs wrote: > On Mon, Aug 22, 2016 at 09:28:44PM +0200, Hans de Graaff wrote: >> On Mon, 2016-08-22 at 10:58 -0500, William Hubbs wrote: >>> All, >>> >>> it looks like app-emulation/docker expects /etc/hostname to exist. >> >> Is there a bug for this? docker seems to work fine for me on a system >> without this file present. > > Ok, now for the clarification. > > Someone here at the office was wanting a cross-platform way to find out > the hostname of the host the container is running on inside the > container. We made another suggestion for that, so forget about the > docker angle on this for now. > > But, /etc/hostname is a multi-distro standard for where the hostname is > located, so I would like to make openrc prefer it over the setting in > /etc/conf.d/hostname if it exists.A > > I suppose whether we populate it by default might be a separate > question. > > William > Changing the way one configures the hostname because one or a few packages A) need this knowledge, and B) hardcode /etc/hostname is not worth changing the canonical way to update it and getting people to change their habits. It makes a bit more sense to rely on previous configuration (/etc/conf.d/hostname) and write a tiny 'script' that populates /etc/hostname. bash could do it (naively) in two lines: source /etc/conf.d/hostname echo "$hostname" > /etc/hostname The 'multi-distro standard' is du jour at best and imo not a compelling reason to follow. -- Daniel Campbell - Gentoo Developer OpenPGP Key: 0x1EA055D6 @ hkp://keys.gnupg.net fpr: AE03 9064 AE00 053C 270C 1DE4 6F7A 9091 1EA0 55D6