--- cryptroot-unlock 2022-08-04 11:24:48.000000000 +0100 +++ cryptroot-unlock-custom 2023-03-06 13:20:54.361482388 +0000 @@ -180,6 +180,8 @@ # interactive mode on a TTY: keep trying until all configured devices have # been unlocked or the maximum number of tries exceeded UNLOCK_ALL=y + echo "Unlocking $(count_locked_devices) devices..." + read -rs -p "Please unlock disks:"; echo while :; do # note: if the script is not killed before pivot_root it should # exit on its own once $TIMEOUT is reached @@ -187,9 +189,11 @@ usleep 100000 continue fi - read -rs -p "Please unlock disk $CRYPTTAB_NAME: "; echo printf '%s' "$REPLY" >"$PASSFIFO" - wait_for_answer || true + wait_for_answer + if [[ $? -eq 1 ]]; then + read -rs -p "Retry password for $CRYPTTAB_NAME: "; echo + fi done else # non-interactive mode: slurp the passphrase from stdin and exit