Skip to content

Commit

Permalink
Revert "nixos stage-1: try to quit plymouth if started on failure"
Browse files Browse the repository at this point in the history
This reverts commit c69c76c.

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).
  • Loading branch information
abbradar committed Jul 17, 2016
1 parent 6dc6ae0 commit 193ab8b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 deletions.
26 changes: 4 additions & 22 deletions nixos/modules/system/boot/luksroot.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ let
${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
}
Expand Down Expand Up @@ -78,7 +78,9 @@ let
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
Expand Down Expand Up @@ -461,26 +463,6 @@ in
''}
'';

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);
boot.initrd.postDeviceCommands = concatStrings (mapAttrsToList openCommand postLVM);

Expand Down
3 changes: 0 additions & 3 deletions nixos/modules/system/boot/stage-1-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ export LVM_SUPPRESS_FD_WARNINGS=true
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
Expand Down

3 comments on commit 193ab8b

@abbradar
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @aszlig. I'll push the real patch later because I've discovered a corner case during testing. Still unsure how this happened, but on a QWERTY keyboard "d" (drop a patch, which I intended to do) is near "f" (fixup a patch, merge it with previous with no notice) -- this may be the reason ^_^".

@domenkozar
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abbradar shouldn't we also revert ec072cb

@abbradar
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, my mistake. Thanks and done! cc @vcunat

Please sign in to comment.