]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix(dracut-systemd): check systemd-cryptsetup before including
authorJo Zzsi <jozzsicsataban@gmail.com>
Sat, 9 Nov 2024 19:06:57 +0000 (14:06 -0500)
committerLaszlo <laszlo.gombos@gmail.com>
Sun, 10 Nov 2024 00:53:35 +0000 (19:53 -0500)
modules.d/98dracut-systemd/module-setup.sh

index 0438e40f0df45a3ec6ce1bb3ff24160918efb624..f2502cd7852a811b4fcd706fafcf162cd91db397 100755 (executable)
@@ -19,7 +19,10 @@ depends() {
     # systemd-cryptsetup is mandatory dependency
     # see https://github.com/dracut-ng/dracut-ng/issues/563
     if dracut_module_included "crypt"; then
-        deps+=" systemd-cryptsetup"
+        module_check systemd-cryptsetup > /dev/null 2>&1
+        if [[ $? == 255 ]]; then
+            deps+=" systemd-cryptsetup"
+        fi
     fi
 
     echo "$deps"