From fdfa899895d53d5aa1a6821e308743d38f5c6456 Mon Sep 17 00:00:00 2001 From: Jo Zzsi Date: Fri, 19 Sep 2025 19:05:05 -0400 Subject: [PATCH] fix(systemd): make dbus optional dependency Remove dbus as a mandatory dependency for the following dracut modules - systemd-hostnamed - systemd-portabled - systemd-resolved - systemd-timedated - systemd-timesyncd Users and distributions can still include dbus dracut module in the initramfs as before, but now dbus dracut module is required to be explicitly added in the dracut configuration. The motivation of this change is to allow users and distributions to exclude dbus from the initramfs. --- modules.d/11systemd-hostnamed/module-setup.sh | 2 +- modules.d/11systemd-portabled/module-setup.sh | 2 -- modules.d/11systemd-resolved/module-setup.sh | 2 +- modules.d/11systemd-timedated/module-setup.sh | 2 -- modules.d/11systemd-timesyncd/module-setup.sh | 2 +- 5 files changed, 3 insertions(+), 7 deletions(-) diff --git a/modules.d/11systemd-hostnamed/module-setup.sh b/modules.d/11systemd-hostnamed/module-setup.sh index d58906174..401d248da 100755 --- a/modules.d/11systemd-hostnamed/module-setup.sh +++ b/modules.d/11systemd-hostnamed/module-setup.sh @@ -20,7 +20,7 @@ check() { depends() { # This module has external dependency on other module(s). - echo dbus systemd-sysusers + echo systemd-sysusers # Return 0 to include the dependent module(s) in the initramfs. return 0 diff --git a/modules.d/11systemd-portabled/module-setup.sh b/modules.d/11systemd-portabled/module-setup.sh index 05ab50636..85ed6adea 100755 --- a/modules.d/11systemd-portabled/module-setup.sh +++ b/modules.d/11systemd-portabled/module-setup.sh @@ -19,8 +19,6 @@ check() { # Module dependency requirements. depends() { - # This module has external dependency on other module(s). - echo dbus # Return 0 to include the dependent module(s) in the initramfs. return 0 diff --git a/modules.d/11systemd-resolved/module-setup.sh b/modules.d/11systemd-resolved/module-setup.sh index d20f211c6..51e960cbe 100755 --- a/modules.d/11systemd-resolved/module-setup.sh +++ b/modules.d/11systemd-resolved/module-setup.sh @@ -20,7 +20,7 @@ check() { depends() { # This module has external dependency on other module(s). - echo dbus systemd-sysusers + echo systemd-sysusers # Return 0 to include the dependent module(s) in the initramfs. return 0 diff --git a/modules.d/11systemd-timedated/module-setup.sh b/modules.d/11systemd-timedated/module-setup.sh index 5e9c5caf9..245240238 100755 --- a/modules.d/11systemd-timedated/module-setup.sh +++ b/modules.d/11systemd-timedated/module-setup.sh @@ -19,8 +19,6 @@ check() { # Module dependency requirements. depends() { - # This module has external dependency on other module(s). - echo dbus # Return 0 to include the dependent module(s) in the initramfs. return 0 diff --git a/modules.d/11systemd-timesyncd/module-setup.sh b/modules.d/11systemd-timesyncd/module-setup.sh index 82902b3b0..aecd6bfd7 100755 --- a/modules.d/11systemd-timesyncd/module-setup.sh +++ b/modules.d/11systemd-timesyncd/module-setup.sh @@ -20,7 +20,7 @@ check() { depends() { # This module has external dependency on other module(s). - echo dbus systemd-sysusers systemd-timedated + echo systemd-sysusers systemd-timedated # Return 0 to include the dependent module(s) in the initramfs. return 0 -- 2.47.3