Restore original /dev/tty after GPG (bug #410073)
authorSebastian Pipping <sebastian@pipping.org>
Thu, 29 Mar 2012 17:46:26 +0000 (19:46 +0200)
committerSebastian Pipping <sebastian@pipping.org>
Thu, 29 Mar 2012 17:46:26 +0000 (19:46 +0200)
ChangeLog
defaults/initrd.scripts

index e8e73d935fbc6b87cd4e41ec9676cb32fb57e0b0..a1a3aabdd344107c9071d74bb42632fec13020f2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,10 @@
 # Distributed under the GPL v2
 # $Id$
 
+  29 Mar 2012; Sebastian Pipping <sping@gentoo.org> defaults/initrd.scripts:
+  Restore original /dev/tty after GPG (bug #410073), report and initial patch
+  by Brendan Pike
+
   22 Mar 2012; Sebastian Pipping <sping@gentoo.org> genkernel:
   Bump version to 3.4.27
 
index 296b150fa8d73af3115d23923a8596e2abeab279..4e0e123fc8adea8f136916d4cc6f35bdd5d06372 100755 (executable)
@@ -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