]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(systemd-hostnamed): add missing dbus-org.freedesktop.hostname1.service
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Thu, 22 Dec 2022 14:13:29 +0000 (15:13 +0100)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Sat, 24 Dec 2022 14:30:19 +0000 (14:30 +0000)
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

index 2082f295cfdc580c890969907b925817f41b7fa5..2a1fa02e24b27800c4aaa93e86e523e065a156f1 100755 (executable)
@@ -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.