]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix(crypt): include systemd-cryptsetup module when needed
authorJo Zzsi <jozzsicsataban@gmail.com>
Mon, 5 Aug 2024 14:48:50 +0000 (10:48 -0400)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Wed, 28 Aug 2024 11:59:03 +0000 (07:59 -0400)
modules.d/90crypt/module-setup.sh

index 84d61d74cf129ff1cbd971c58bbd0d21b5c9ce7f..d441420cdb2200381503f606f8125c9062046fe5 100755 (executable)
@@ -18,7 +18,15 @@ check() {
 
 # called by dracut
 depends() {
-    echo dm rootfs-block
+    local deps
+    deps="dm rootfs-block"
+
+    if dracut_module_included "systemd"; then
+        deps+=" systemd-cryptsetup"
+    fi
+
+    echo "$deps"
+    return 0
 }
 
 # called by dracut