Fix the default shell

Go with whatever is set by SSH, and fall back to "linux" if the terminal is not available.

This fixes #1975
This commit is contained in:
Dag Wieers 2013-03-01 02:14:11 +01:00
parent 45d2ecfbf2
commit 3d23d92fbf
2 changed files with 21 additions and 3 deletions

View File

@ -36,6 +36,10 @@
TERMINFO=$INSTALL/usr/share/terminfo $ROOT/$TOOLCHAIN/bin/tic -xe linux \
$PKG_BUILD/misc/terminfo.src
mkdir -p $INSTALL/usr/share/terminfo/s
TERMINFO=$INSTALL/usr/share/terminfo $ROOT/$TOOLCHAIN/bin/tic -xe screen \
$PKG_BUILD/misc/terminfo.src
mkdir -p $INSTALL/usr/share/terminfo/v
TERMINFO=$INSTALL/usr/share/terminfo $ROOT/$TOOLCHAIN/bin/tic -xe vt100 \
$PKG_BUILD/misc/terminfo.src
@ -45,5 +49,3 @@
$PKG_BUILD/misc/terminfo.src
TERMINFO=$INSTALL/usr/share/terminfo $ROOT/$TOOLCHAIN/bin/tic -xe xterm-color \
$PKG_BUILD/misc/terminfo.src
TERMINFO=$INSTALL/usr/share/terminfo $ROOT/$TOOLCHAIN/bin/tic -xe vt100 \
$PKG_BUILD/misc/terminfo.src

View File

@ -26,5 +26,21 @@
PS1='\[\e[0;32m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[1;32m\]\$\[\e[m\] '
export PS1
TERM="linux"
case "$TERM" in
# Do nothing when TERM already set (e.g. by SSH) and known
(linux|nxterm|screen|vt100|vt100-am|xterm|xterm-color)
;;
# Default to "linux" when unset
("")
TERM="linux"
;;
# Default to "xterm" when unknown
(*)
TERM="xterm"
;;
esac
export TERM