Files
systemd/units
Arian van Putten c7837840f5 firstboot: apply hostname via hostnamed varlink API
Previously we just wrote /etc/hostname and returned. The kernel hostname
was left at whatever PID 1 sethostname()'d very early in boot (before
/etc/hostname existed), which meant hostnamectl reported the transient
hostname instead of the static one until the next reboot.

Call io.systemd.Hostname.SetStaticHostname on the running system so
hostnamed writes /etc/hostname and updates the kernel hostname in one
step. If hostnamed is unreachable (masked or absent on minimal images)
fall back to writing /etc/hostname directly. --root=/--image= also keeps
writing the file directly, since hostnamed only manages the running
system.
2026-08-28 06:29:58 +09:00
..
2024-03-16 05:31:44 +09:00
2024-03-16 05:31:44 +09:00