summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Cohen <bencoh@notk.org>2013-08-22 13:15:05 +0200
committerBenjamin Cohen <bencoh@notk.org>2013-08-22 13:17:11 +0200
commitca2fa075765e2cdc4f568cf43177603dd640751c (patch)
tree286631ee798475cf60fa4d47edf074c850b03124
parent6cefae8b91a49a4017536e2e6757ec118b982a6d (diff)
kvm-wrapper.sh: fix fail_exit buggy input
-rwxr-xr-xkvm-wrapper.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/kvm-wrapper.sh b/kvm-wrapper.sh
index 9605389..758300d 100755
--- a/kvm-wrapper.sh
+++ b/kvm-wrapper.sh
@@ -24,9 +24,13 @@ function fail_exit ()
local USE_PID_FILE=""
test_exist "$PID_FILE" || USE_PID_FILE="true"
[[ -n "$USE_PID_FILE" ]] && echo "error" > "$PID_FILE"
+ echo ""
+ stty sane
echo "Press ^D (EOF) or enter to exit"
read
[[ -n "$USE_PID_FILE" ]] && rm -f "$PID_FILE"
+ stty sane
+ reset
)
echo "Exiting."
exit 1