From 2d8b74a7f4132adbff5c388b75e9a004e150964e Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Sat, 25 Aug 2012 11:43:05 -0500 Subject: [PATCH] .profile: ksh login script The default shell on most internal hosts is ksh which executes ~/.profile. Try to exec bash if it's available on the current host, so that we can use all the fancy stuff in .bash_profile/.bashrc. --- .profile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 .profile diff --git a/.profile b/.profile new file mode 100755 index 0000000..4c51dae --- /dev/null +++ b/.profile @@ -0,0 +1,35 @@ +# This is the default standard profile provided to a user. +# They are expected to edit it to meet their own needs. +unalias cd +stty erase ^? intr ^C kill ^U echoe +PATH=/epic/bin:/bin:/home/bin:/usr/bin:/bin:/opt/std/bin:/usr/local/bin:/usr/sbin +export PATH + +set -a +PS1='$LOGNAME'@$(uname -n):'$PWD> ' +set +a +PAGER=more + +# Try to use tcsh or bash if available +if [[ -a /usr/local/bin/bash ]] +then + SHELL="/usr/local/bin/bash" + export SHELL; exec $SHELL +fi +if [[ -a /bin/bash ]] +then + SHELL="/bin/bash" + export SHELL; exec $SHELL +fi + +# if current $TERM isn't valid, fall-back to TERM=xterm-color or TERM=xterm +case $(tput colors 2>&1) in + tput* ) + export TERM=xterm-color + case $(tput colors 2>&1) in + tput* ) + export TERM=xterm + ;; + esac + ;; +esac -- 2.45.2