X-Git-Url: https://git.tld-linux.org/?p=packages%2Fdracut.git;a=blobdiff_plain;f=crypttab-keyscript.patch;h=a276b23fd98ef0699273181045ffc8c0f31161be;hp=1438099496054f21ff73d5db54583b8d61166da1;hb=HEAD;hpb=3f3a9504b008558380bea81c4ea45c00e05ae239 diff --git a/crypttab-keyscript.patch b/crypttab-keyscript.patch index 1438099..a857794 100644 --- a/crypttab-keyscript.patch +++ b/crypttab-keyscript.patch @@ -1,7 +1,7 @@ -diff -ur dracut-047.orig/modules.d/90crypt/cryptroot-ask.sh dracut-047/modules.d/90crypt/cryptroot-ask.sh ---- dracut-047.orig/modules.d/90crypt/cryptroot-ask.sh 2018-02-19 09:00:33.000000000 +0000 -+++ dracut-047/modules.d/90crypt/cryptroot-ask.sh 2018-07-02 11:37:44.222951181 +0000 -@@ -106,6 +106,9 @@ +diff -urpa dracut-056.orig/modules.d/90crypt/cryptroot-ask.sh dracut-056/modules.d/90crypt/cryptroot-ask.sh +--- dracut-056.orig/modules.d/90crypt/cryptroot-ask.sh 2022-02-18 12:32:53.000000000 +0100 ++++ dracut-056/modules.d/90crypt/cryptroot-ask.sh 2022-08-28 19:27:11.079536407 +0200 +@@ -112,6 +112,9 @@ while [ $# -gt 0 ]; do header=*) cryptsetupopts="${cryptsetupopts} --${1}" ;; @@ -11,13 +11,14 @@ diff -ur dracut-047.orig/modules.d/90crypt/cryptroot-ask.sh dracut-047/modules.d esac shift done -@@ -163,6 +166,14 @@ +@@ -174,6 +177,15 @@ else done fi +if [ ! -z "$keyscript" -a -x "$keyscript" ]; then + info "Executing keyscript $keyscript" -+ eval $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 @@ -25,11 +26,11 @@ diff -ur dracut-047.orig/modules.d/90crypt/cryptroot-ask.sh dracut-047/modules.d + if [ $ask_passphrase -ne 0 ]; then luks_open="$(command -v cryptsetup) $cryptsetupopts luksOpen" - ask_for_password --ply-tries 5 \ -diff -ur dracut-047.orig/modules.d/90crypt/module-setup.sh dracut-047/modules.d/90crypt/module-setup.sh ---- dracut-047.orig/modules.d/90crypt/module-setup.sh 2018-02-19 09:00:33.000000000 +0000 -+++ dracut-047/modules.d/90crypt/module-setup.sh 2018-07-02 10:57:20.952095619 +0000 -@@ -96,10 +96,26 @@ + _timeout=$(getargs "rd.luks.timeout") +diff -urpa dracut-056.orig/modules.d/90crypt/module-setup.sh dracut-056/modules.d/90crypt/module-setup.sh +--- dracut-056.orig/modules.d/90crypt/module-setup.sh 2022-02-18 12:32:53.000000000 +0100 ++++ dracut-056/modules.d/90crypt/module-setup.sh 2022-08-28 19:27:11.079536407 +0200 +@@ -136,10 +136,26 @@ install() { forceentry="yes" break ;;