]> TLD Linux GIT Repositories - packages/dracut.git/commitdiff
- verify if keyscript has successfully unlocked luks volume
authorMarcin Krol <hawk@tld-linux.org>
Tue, 13 Sep 2022 18:32:47 +0000 (20:32 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Tue, 13 Sep 2022 18:32:47 +0000 (20:32 +0200)
crypttab-keyscript.patch
dracut.spec

index 2d27b918a62cd08634792d8a708d8ebc293ba768..a857794d037f69f0afd7e0b2ee74093fde9fe6df 100644 (file)
@@ -11,13 +11,14 @@ diff -urpa dracut-056.orig/modules.d/90crypt/cryptroot-ask.sh dracut-056/modules
      esac
      shift
  done
-@@ -174,6 +177,14 @@ else
+@@ -174,6 +177,15 @@ else
      done
  fi
  
 +if [ ! -z "$keyscript" -a -x "$keyscript" ]; then
 +    info "Executing keyscript $keyscript"
 +    eval $keyscript "$luksfile" | cryptsetup -d - $cryptsetupopts luksOpen "$device" "$luksname"
++    cryptsetup status "$luksname" > /dev/null 2>&1
 +    if [ $? -eq 0 ]; then
 +        ask_passphrase=0
 +    fi
index 9fc6a0856335701e0c917cd870d04ac489c8b0fa..1339f8c22ee4699300178f0529b973462eae1aa6 100644 (file)
@@ -2,7 +2,7 @@ Summary:        Initramfs generator using udev
 Summary(pl.UTF-8):     Generator initramfs wykorzystujÄ…cy udev
 Name:          dracut
 Version:       056
-Release:       2
+Release:       3
 License:       GPL v2+
 Group:         Base
 Source0:       https://www.kernel.org/pub/linux/utils/boot/dracut/%{name}-%{version}.tar.xz