utils/pb-console: use a linux termcap entry for local consoles
authorJeremy Kerr <jk@ozlabs.org>
Mon, 19 May 2014 05:16:51 +0000 (13:16 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 19 May 2014 06:22:19 +0000 (14:22 +0800)
For local consoles, we always want a TERM=linux.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
utils/pb-console

index 9da899fdf7b242f4c47652cd0d753c0691445253..1c2bf62784f62f0aff6faae911063cb385dc71d3 100644 (file)
@@ -96,6 +96,13 @@ do
        fi
 done
 
        fi
 done
 
+# we force local terminals to use the linux termcap definition
+case "$(tty)" in
+/dev/tty[0-9]*)
+       export TERM=linux
+       ;;
+esac
+
 verbose_opt=
 sysinfo_bin=$(dirname $0)/pb-sysinfo
 if [ -x $sysinfo_bin ] && $sysinfo_bin --debug-enabled
 verbose_opt=
 sysinfo_bin=$(dirname $0)/pb-sysinfo
 if [ -x $sysinfo_bin ] && $sysinfo_bin --debug-enabled