diff options
author | Benjamin Cohen <bencoh@notk.org> | 2013-08-22 13:15:05 +0200 |
---|---|---|
committer | Benjamin Cohen <bencoh@notk.org> | 2013-08-22 13:17:11 +0200 |
commit | ca2fa075765e2cdc4f568cf43177603dd640751c (patch) | |
tree | 286631ee798475cf60fa4d47edf074c850b03124 | |
parent | 6cefae8b91a49a4017536e2e6757ec118b982a6d (diff) |
kvm-wrapper.sh: fix fail_exit buggy input
-rwxr-xr-x | kvm-wrapper.sh | 4 |
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 |