init.d/hostname: fix /etc/hostname processing#728
Conversation
This is an alternative to #585 in which we keep the init script but use `hostname -F` to read the value from @SYSCONFDIR@/hostname. This allows for comments in the hostname file. Also, we deprecate using /etc/conf.d/* to set the host name.
|
This is not portable to non-Linux. FreeBSD's hostname does not support an |
|
It looks like |
|
i think the point of #585 was to avoid the overhead of an init script for the simple action of setting the hostname i think we either move it to c code, or leave the script as is (maybe adding an explicit default for when /etc/hostname is missing, as currently the script noops on that case) design wise i like the init script more, as we don't put either way i think deprecating /etc/conf.d/hostname is a good idea, no point to have both it and /etc/hostname, and systemd accepts passing in the hostname via a kernel cmdline flag, maybe we should do smth similar? |
|
I'll go back to #585 and take a look at improving it more then. It may not be a bad idea to set the hostname in c, also this might be better since |
This is an alternative to #585 in which we keep the init script but use
hostname -Fto read the value from @SYSCONFDIR@/hostname. This allows for comments in the hostname file.Also, we deprecate using /etc/conf.d/* to set the host name.