Revert "nixos stage-1: try to quit plymouth if started on failure"

This reverts commit c69c76ca7efecba24aba555c2a03f933997d1fd5.

This patch was messed up during a rebase -- the commit title doesn't match what
it really does at all (it is actually a broken attempt to get LUKS passphrase
prompts in Plymouth).

Changed files
+4 -25
nixos
modules
+4 -22
nixos/modules/system/boot/luksroot.nix
···
${optionalString (header != null) "--header=${header}"} \
${optionalString (keyFile != null) "--key-file=${keyFile} ${optionalString (keyFileSize != null) "--keyfile-size=${toString keyFileSize}"}"} \
> /.luksopen_args
-
get_password "Enter LUKS Passphrase" cryptsetup-askpass
+
cryptsetup-askpass
rm /.luksopen_args
}
···
for try in $(seq 3); do
${optionalString yubikey.twoFactor ''
-
k_user="$(get_password "Enter two-factor passphrase" cat)"
+
echo -n "Enter two-factor passphrase: "
+
read -s k_user
+
echo
''}
if [ ! -z "$k_user" ]; then
···
$out/bin/ykinfo -V
$out/bin/openssl-wrap version
''}
-
'';
-
-
boot.initrd.preDeviceCommands = ''
-
get_password() {
-
local ret
-
local reply
-
local tty_stat
-
-
tty_stat="$(stty -g)"
-
stty -echo
-
for i in `seq 1 3`; do
-
echo -n "$1: "
-
read reply
-
echo "$reply" | "$2"
-
if [ "$?" = "0" ]; then
-
break
-
fi
-
done
-
stty "$tty_stat"
-
}
'';
boot.initrd.preLVMCommands = concatStrings (mapAttrsToList openCommand preLVM);
-3
nixos/modules/system/boot/stage-1-init.sh
···
fail() {
if [ -n "$panicOnFail" ]; then exit 1; fi
-
# If we have a splash screen started, quit it.
-
command -v plymouth >/dev/null 2>&1 && plymouth quit
-
# If starting stage 2 failed, allow the user to repair the problem
# in an interactive shell.
cat <<EOF