diff --git a/nixos/modules/system/boot/luksroot.nix b/nixos/modules/system/boot/luksroot.nix index c1a5e9c3877d..c8dc81383d6e 100644 --- a/nixos/modules/system/boot/luksroot.nix +++ b/nixos/modules/system/boot/luksroot.nix @@ -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