-
Notifications
You must be signed in to change notification settings - Fork 300
Open
Description
Hey!
Sending host-name option through DHCP is mostly ignored due to how hostname.sh works:
- OpenBMC boots
- dhclient gets its DHCP lease containing a
host-nameoption - dhclient-script sets the hostname using the
hostnamecommand hostname.shoverrides the hostname with eitherbmc-oobor with hostname stored in/mnt/data/hostnameand store the result in/mnt/data/hostname.
Also, if there is no network connectivity on boot:
- OpenBMC boots
- dhclient is unable to get a lease and will go on background
hostname.shwill sets and store it in/mnt/data/hostname- network connectivity comes back
- dhclient gets a lease and host-name
dhclient-scriptwon't update the hostname as one is already set
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.
Metadata
Metadata
Assignees
Labels
No labels