/etc/init.d/hostname openrc script ignores variable set in /etc/conf.d/hostname
Relevant lines from /etc/conf.d/hostname:
hostname=“localhost”
Relevant lines from /etc/init.d/hostname:
opts=“localhost”
hostname $opts
If /etc/hostname does not exist hostname is explicitly set to ‘localhost’, ignoring any variable set in /etc/conf.d/hostname
This can be fixed by changing line 13 to: opts=$hostname
(from redmine: issue id 9737, created on 2018-12-06, closed on 2019-05-04)
- Changesets:
- Revision b6b6dcd2 by Natanael Copa on 2018-12-07T14:44:18Z:
main/openrc: fix hostname script
we should not override hostname set in /etc/conf.d/hostname
ref #9737
- Revision f6e6c2dd by Natanael Copa on 2018-12-07T14:47:07Z:
main/openrc: fix hostname script
we should not override hostname set in /etc/conf.d/hostname
fixes #9737
(cherry picked from commit b6b6dcd2e868031216140f6f75906eed1e9cbd40)