From 2dab903886958db2ad93099eaf098be6aee73e49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Wed, 5 Aug 2020 07:55:39 +0200 Subject: [PATCH] unset TMOUT if not in TTY --- myshell_load_defaults | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/myshell_load_defaults b/myshell_load_defaults index 658d925..60e6761 100644 --- a/myshell_load_defaults +++ b/myshell_load_defaults @@ -3,8 +3,6 @@ # if we are root, exit after 5 Minutes case $(tty) in /dev/tty[0-9]*) - #[ $( id -u ) -eq 0 ] && TMOUT=${MYSHELLCONFIG_ROOT_TMOUT} - #[ $( id -u ) -gt 0 ] && TMOUT=${MYSHELLCONFIG_USER_TMOUT} case $(id -u) in 0) TMOUT=${MYSHELLCONFIG_ROOT_TMOUT:-500} @@ -16,7 +14,8 @@ case $(tty) in echo "Run in TTY -> set autologout \$TMOUT=$TMOUT" >&2 ;; *) - echo "Run in other terminal" >&2 + echo "Run in other terminal - set no autologout" >&2 + unset TMOUT ;; esac