hostname variable configuration in /etc/conf.d/hostname made moot by /etc/hostname being created by alpine-baselayout at boot
Expected behavior of /etc/init.d/hostname script is to check if /etc/hostname exists, else set hostname to the variable configured in /etc/conf.d/hostname
However, /etc/hostname will always exist prior to this check since it is installed by alpine-baselayout at boot (set to ‘localhost’). The init.d script will always return True when checking for the file, which results in the conf.d variable never being used.
Related to: https://bugs.alpinelinux.org/issues/9737
(from redmine: issue id 9744, created on 2018-12-10)