From 23a40aeb0ee2a46420fe0186b3d822078757fc01 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Thu, 29 Mar 2012 19:46:26 +0200 Subject: [PATCH] Restore original /dev/tty after GPG (bug #410073) --- ChangeLog | 4 ++++ defaults/initrd.scripts | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e8e73d9..a1a3aab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ # Distributed under the GPL v2 # $Id$ + 29 Mar 2012; Sebastian Pipping defaults/initrd.scripts: + Restore original /dev/tty after GPG (bug #410073), report and initial patch + by Brendan Pike + 22 Mar 2012; Sebastian Pipping genkernel: Bump version to 3.4.27 diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 296b150..4e0e123 100755 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -880,7 +880,13 @@ openLUKS() { fi # At this point, keyfile or not, we're ready! crypt_filter "${gpg_cmd}cryptsetup ${cryptsetup_options} luksOpen ${LUKS_DEVICE} ${LUKS_NAME}" - if [ $? -eq 0 ] + crypt_filter_ret=$? + + [ -e /dev/tty.org ] \ + && rm -f /dev/tty \ + && mv /dev/tty.org /dev/tty + + if [ ${crypt_filter_ret} -eq 0 ] then good_msg "LUKS device ${LUKS_DEVICE} opened" ${CRYPT_SILENT} break -- 2.26.2