From: Marcin Krol Date: Tue, 13 Sep 2022 18:32:47 +0000 (+0200) Subject: - verify if keyscript has successfully unlocked luks volume X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=6a7c4a3da809ade762afacb3b9fd743a7b723f27;p=packages%2Fdracut.git - verify if keyscript has successfully unlocked luks volume --- diff --git a/crypttab-keyscript.patch b/crypttab-keyscript.patch index 2d27b91..a857794 100644 --- a/crypttab-keyscript.patch +++ b/crypttab-keyscript.patch @@ -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 diff --git a/dracut.spec b/dracut.spec index 9fc6a08..1339f8c 100644 --- a/dracut.spec +++ b/dracut.spec @@ -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