Blame SOURCES/thermostat_setup_ctrl_c.patch

aa165c
# HG changeset patch
aa165c
# User Omair Majid <omajid@redhat.com>
aa165c
# Date 1426001971 14400
aa165c
#      Tue Mar 10 11:39:31 2015 -0400
aa165c
# Node ID db706e3e09ed947ff77cbe75e23dd82c5d6b8b82
aa165c
# Parent  505bcac210496aadb32b9be4a0869260fe0a5005
aa165c
Don't break terminal on Ctrl-c when reading password
aa165c
Reviewed-by: jerboaa
aa165c
Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2015-March/013058.html
aa165c
aa165c
diff --git a/distribution/scripts/thermostat-setup b/distribution/scripts/thermostat-setup
aa165c
--- a/distribution/scripts/thermostat-setup
aa165c
+++ b/distribution/scripts/thermostat-setup
aa165c
@@ -56,6 +56,8 @@
aa165c
 # For debugging
aa165c
 #set -xv
aa165c
 
aa165c
+tty_flags="$(stty -g)"
aa165c
+
aa165c
 # Interruptions are failures
aa165c
 trap exitFail SIGINT
aa165c
 
aa165c
@@ -122,6 +124,7 @@
aa165c
   removeTempStampFile
aa165c
   cleanupSedFiles
aa165c
   echo 'Thermostat setup failed!' 1>&2
aa165c
+  stty "$tty_flags"
aa165c
   exit 1
aa165c
 }
aa165c