]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(dbus-daemon): only error out in install()
authorHarald Hoyer <harald@redhat.com>
Sat, 17 Apr 2021 11:20:56 +0000 (13:20 +0200)
committerHarald Hoyer <harald@hoyer.xyz>
Sat, 17 Apr 2021 11:22:58 +0000 (13:22 +0200)
Don't hard exit in `check()`. The transaction logic only checks if it
should/can include the module. Just return `255` and the `dbus` meta
module will pick its dependency.

modules.d/06dbus-daemon/module-setup.sh

index 29f669fec95ab2af88b6f3cea1f14ec6d6999164..c3afaa95f54391cce04177f7d8f61cc881e5fd6d 100755 (executable)
@@ -10,12 +10,6 @@ check() {
     require_binaries dbus-daemon || return 1
     require_binaries dbus-send || return 1
 
-    # dbus conflicts with dbus-broker.
-    if dracut_module_included "dbus-broker"; then
-        derror "dbus conflicts with dbus-broker in the initramfs."
-        exit 1
-    fi
-
     # Return 255 to only include the module, if another module requires it.
     return 255
 }
@@ -31,6 +25,11 @@ depends() {
 
 # Install the required file(s) and directories for the module in the initramfs.
 install() {
+    # dbus conflicts with dbus-broker.
+    if dracut_module_included "dbus-broker"; then
+        derror "dbus conflicts with dbus-broker in the initramfs."
+        return 1
+    fi
 
     # Create dbus related directories.
     inst_dir "$dbus"