From 269336fcf0b232982ed47b517713060e560cc045 Mon Sep 17 00:00:00 2001 From: Nicolas Roman Date: Mon, 18 Feb 2019 17:37:17 +0100 Subject: [PATCH] fixed shellcheck warnings --- evomaintenance.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/evomaintenance.sh b/evomaintenance.sh index b576e7f..cc50f21 100755 --- a/evomaintenance.sh +++ b/evomaintenance.sh @@ -65,13 +65,14 @@ get_now() { # timeout on read(), uses TMOUT env as timer timedout_read() { - if [ -z ${TMOUT+x} ] || [ "$TMOUT" = 0 ]; then - export TMOUT=36000 + if [ -z "${TMOUT+x}" ] || [ "$TMOUT" = 0 ]; then + # maximum allowed by stty + export TMOUT=25 fi user_input=$1 old_tty_settings=$(stty -g) stty -icanon min 0 time ${TMOUT}0 - read $user_input + read -r "$user_input" stty "$old_tty_settings" unset TMOUT }