]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
crypt: with systemd cryptsetup is not needed
authorHarald Hoyer <harald@redhat.com>
Wed, 11 Jan 2017 07:59:22 +0000 (08:59 +0100)
committerHarald Hoyer <harald@redhat.com>
Mon, 16 Jan 2017 13:27:39 +0000 (14:27 +0100)
modules.d/90crypt/module-setup.sh

index 6c377efd6a9f04a48ec2d2470b7b5b9b2004a7d6..814ab7afaafa3d60ca0ff1f23360262bff71f870 100755 (executable)
@@ -4,7 +4,7 @@
 check() {
     local _rootdev
     # if cryptsetup is not installed, then we cannot support encrypted devices.
-    require_binaries cryptsetup || return 1
+    require_any_binary $systemdutildir/systemd-cryptsetup cryptsetup || return 1
 
     [[ $hostonly ]] || [[ $mount_needs ]] && {
         for fs in "${host_fs_types[@]}"; do
@@ -57,12 +57,12 @@ install() {
         [[ $_cryptconf ]] && printf "%s\n" "$_cryptconf" >> "${initdir}/etc/cmdline.d/90crypt.conf"
     fi
 
-    inst_multiple cryptsetup rmdir readlink umount
-    inst_script "$moddir"/cryptroot-ask.sh /sbin/cryptroot-ask
-    inst_script "$moddir"/probe-keydev.sh /sbin/probe-keydev
-    inst_hook cmdline 10 "$moddir/parse-keydev.sh"
     inst_hook cmdline 30 "$moddir/parse-crypt.sh"
     if ! dracut_module_included "systemd"; then
+        inst_multiple cryptsetup rmdir readlink umount
+        inst_script "$moddir"/cryptroot-ask.sh /sbin/cryptroot-ask
+        inst_script "$moddir"/probe-keydev.sh /sbin/probe-keydev
+        inst_hook cmdline 10 "$moddir/parse-keydev.sh"
         inst_hook cleanup 30 "$moddir/crypt-cleanup.sh"
     fi