Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dagwieers committed Mar 3, 2013
1 parent 45d2ecf commit 3d23d92
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
6 changes: 4 additions & 2 deletions packages/devel/ncurses/install
Expand Up @@ -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
Expand All @@ -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
18 changes: 17 additions & 1 deletion packages/sysutils/bash/profile.d/shell.conf
Expand Up @@ -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

0 comments on commit 3d23d92

Please sign in to comment.