Open vincentbernat opened 3 years ago
Hey!
Sending host-name option through DHCP is mostly ignored due to how hostname.sh works:
host-name
hostname.sh
hostname
bmc-oob
/mnt/data/hostname
Also, if there is no network connectivity on boot:
dhclient-script
In case systemd is used, this is the same logic in networkd, except the hostname seems to be set even when a hostname already is set (I didn't test).
I would suggest to not change hostname if one already exists (as per hostname command). This wouldn't solve the second case, except with systemd.
+1
Hey!
Sending
host-name
option through DHCP is mostly ignored due to howhostname.sh
works:host-name
optionhostname
commandhostname.sh
overrides the hostname with eitherbmc-oob
or with hostname stored in/mnt/data/hostname
and store the result in/mnt/data/hostname
.Also, if there is no network connectivity on boot:
hostname.sh
will sets and store it in/mnt/data/hostname
dhclient-script
won't update the hostname as one is already setIn case systemd is used, this is the same logic in networkd, except the hostname seems to be set even when a hostname already is set (I didn't test).
I would suggest to not change hostname if one already exists (as per
hostname
command). This wouldn't solve the second case, except with systemd.