]> git.ipfire.org Git - thirdparty/dracut.git/blobdiff - modules.d/90crypt/cryptroot-ask.sh
ask for a password on readkey failure
[thirdparty/dracut.git] / 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