From 4cacd07caa3c7051bd6319fd58d79e20fbd431fa Mon Sep 17 00:00:00 2001 From: Guohan Lu Date: Sat, 17 Feb 2018 08:08:51 +0000 Subject: [PATCH] [baseimage]: enable auto logout for console (ttyS*) sessions --- files/image_config/bash/bash.bashrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/files/image_config/bash/bash.bashrc b/files/image_config/bash/bash.bashrc index f59cc1bf6470..d65beb5b0847 100644 --- a/files/image_config/bash/bash.bashrc +++ b/files/image_config/bash/bash.bashrc @@ -53,3 +53,6 @@ if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-no fi } fi + +# enable auto-logout for console ttyS* sessions +tty | grep ttyS >/dev/null && TMOUT=300