From 4fca292b957c8ec256111442ba0db4e539442ac8 Mon Sep 17 00:00:00 2001 From: Antonio Alvarez Feijoo Date: Thu, 22 Dec 2022 15:13:29 +0100 Subject: [PATCH] fix(systemd-hostnamed): add missing dbus-org.freedesktop.hostname1.service Without this service, hostnamectl fails to run in the initrd. ``` sh-5.2# hostnamectl Failed to query system properties: Could not activate remote peer: activation request failed: unknown unit. sh-5.2# systemctl status dbus | grep hostname Dec 22 11:07:56 sd-net-test dbus-broker-launch[216]: Activation request for 'org.freedesktop.hostname1' failed: The systemd unit 'dbus-org.freedesktop.hostname1.service' could not be found. ``` --- modules.d/01systemd-hostnamed/module-setup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/modules.d/01systemd-hostnamed/module-setup.sh b/modules.d/01systemd-hostnamed/module-setup.sh index 2082f295cf..2a1fa02e24 100755 --- a/modules.d/01systemd-hostnamed/module-setup.sh +++ b/modules.d/01systemd-hostnamed/module-setup.sh @@ -39,6 +39,7 @@ install() { "$systemdutildir"/systemd-hostnamed \ "$systemdsystemunitdir"/systemd-hostnamed.service \ "$systemdsystemunitdir/systemd-hostnamed.service.d/*.conf" \ + "$systemdsystemunitdir"/dbus-org.freedesktop.hostname1.service \ hostnamectl # Install the hosts local user configurations if enabled.