]> arthur.barton.de Git - ConfigScripts.git/commitdiff
Always initialize terminal using tset in interactive sessions
authorAlexander Barton <alex@barton.de>
Sat, 25 Aug 2012 21:08:14 +0000 (23:08 +0200)
committerAlexander Barton <alex@barton.de>
Sat, 25 Aug 2012 21:08:14 +0000 (23:08 +0200)
This makes sure, that TERM will have a value that is understood by the
local system.

sys/profile

index 9d7e56366b5d89b18fcc4bb8f42c2a9879a4b630..f9275b4a71fde3cf49f4615e9923533094c7e0a4 100644 (file)
@@ -77,9 +77,6 @@ fi
 [ -r /etc/debian_chroot ] && chroot_name=$(cat /etc/debian_chroot)
 [ -r /etc/chroot_name ] && chroot_name=$(cat /etc/chroot_name)
 
-# validate terminal definition
-[ -z "$TERM" ] && eval `tset -s -Q`
-
 # make sure $UID and $USER is set
 [ -z "$UID" ] && UID=`id -u`
 [ -z "$USER" ] && USER=`id -un`
@@ -126,6 +123,9 @@ fi
 # interactive shell?
 [ "$PS1" ] || return
 
+# validate terminal definition
+eval `tset -s -Q`
+
 # generic shell prompt
 [ "$UID" -eq 0 ] \
        && PS1="<$ME> # " \