The hostname can be set (in order of precedence):
- via
hostname
boot option - via DHCP (either from HOSTNAME or FQDN)
- Default hostname
linuxrc doesn't write to /etc/hostname
, but sets the transient hostname
and writes other settings before Yast starts. After that, Yast takes over.
See https://github.com/yast/yast-network/blob/master/doc/hostname.md
etc/hostname
is an empty file at the beginning of the installationlinuxrc
doesn't write anything to/etc/hostname
linuxrc
writes by default/etc/install.inf::SetHostname=1
linuxrc
writes/etc/sysconfig/network/dhcp::DHCLIENT_SET_HOSTNAME="yes"
- linuxrc writes
/etc/install.inf::SetHostnameUsed=1
- linuxrc takes the value of
hostname
boot option and- writes it to
/etc/install.inf::Hostname
- sets the transient hostname to that value
- writes it to
If hostname=myhost
is used
/etc/install.inf
[...]
SetHostname: 1
SetHostnameUsed: 1
Hostname: myhost
[...]
linuxrc
doesn't write/etc/install.inf::Hostname
, so it is not present.linuxrc
writes/etc/install.inf::SetHostnameUsed=0
.linuxrc
sets the transient hostname toinstall
.
/etc/install.inf
[...]
SetHostname: 1
SetHostnameUsed: 0
[...]
linuxrc changes the hostname to rescue
, which may be overridden by user hostname
boot option.
This value is put into /etc/hostname
of the rescue system. The value there
may later be overridden by DHCP.