Unverified Commit e4e994e3 authored by Arne Keller's avatar Arne Keller Committed by GitHub
Browse files

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

parents 4ff85255 47177c0e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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