]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
ask for a password on readkey failure
authorMax Resch <resch.max@gmail.com>
Tue, 2 Jul 2019 23:22:24 +0000 (01:22 +0200)
committerHarald Hoyer <harald@hoyer.xyz>
Fri, 19 Jul 2019 14:09:01 +0000 (16:09 +0200)
continue asking for a password if readkey for cryptsetup input failed,
e.g. wrong password in the password file

modules.d/90crypt/cryptroot-ask.sh

index 5d63d687111805ae11d651d6d490ced3a0d1bd01..33a823c7b1c4a2baa86da8610abb6b658dfee21f 100755 (executable)
@@ -156,9 +156,9 @@ else
 
         info "Using '$keypath' on '$keydev'"
         readkey "$keypath" "$keydev" "$device" \
-            | cryptsetup -d - $cryptsetupopts luksOpen "$device" "$luksname"
+            | cryptsetup -d - $cryptsetupopts luksOpen "$device" "$luksname" \
+            && ask_passphrase=0
         unset keypath keydev
-        ask_passphrase=0
         break
     done
 fi