hostname: replace @SYSCONFDIR@ references with /etc

I do not know of any situation where /etc/hostname is at any other
location. Also, this does not run on prefix.
This commit is contained in:
William Hubbs 2017-12-14 17:07:31 -06:00
parent eb18f4f348
commit 50b69d564a

View File

@ -20,9 +20,9 @@ depend()
start()
{
local h source x
if [ -s @SYSCONFDIR@/hostname ] && [ -r @SYSCONFDIR@/hostname ]; then
read h x <@SYSCONFDIR@/hostname
source="from @SYSCONFDIR@/hostname"
if [ -s /etc/hostname ] && [ -r /etc/hostname ]; then
read h x </etc/hostname
source="from /etc/hostname"
else
# HOSTNAME variable used to be defined in caps in conf.d/hostname.
# It is also a magic variable in bash.