diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2021-12-20 16:48:54 +0100 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2021-12-21 11:00:43 +0100 |
commit | 2f6a4e41f66496b6719e9b493207b99b9446c837 (patch) | |
tree | fa127a9f03c32edc97b513e8fc4d7b02d3f8c6bc /recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in | |
parent | fddb6e505929b44dc7c98e9bb061648562e30de0 (diff) |
set-hostname: work around race condition
This service sets the hostname on boot to the machine name amended
by the serial number unless /etc/hostname already exists.
systemd does also set a hostname, if none is available it uses
'localhost' and creates an empty /etc/hostname.
This two mechanism have a race condition so that systemd might
run before set-hostname was able to create /etc/hostname. Likely
only seens a recent systemd update.
Fix that by changing the conditions for executing set-hostname to
run when there is no or an empty /etc/hostname file.
Related-to: ELB-4277
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in')
0 files changed, 0 insertions, 0 deletions