nixos/luksroot: Exit if EOF detected in cryptsetup-askpass (#298592)

This commit is contained in:
Arne Keller
2024-12-20 19:15:58 +01:00
committed by GitHub

View File

@@ -502,7 +502,11 @@ let
echo -n "Passphrase for $device: "
IFS= read -rs passphrase
ret=$?
echo
if [ $ret -ne 0 ]; then
die "End of file reached. Exiting shell."
fi
rm /crypt-ramfs/device
echo -n "$passphrase" > /crypt-ramfs/passphrase