#!/bin/sh
# Make it login shell
-case $SHELL in
- */csh|*/tcsh)
- # [t]cshrc is always sourced automatically.
- # Note that sourcing csh.login after .cshrc is non-standard.
- eval `$SHELL -c 'if (-f /etc/csh.login) source /etc/csh.login; if (-f ~/.login) source ~/.login; sh -c set'`
- ;;
- *)
- if [ "$HAVE_LOGIN_SHELL" != "yes" ]; then
- export HAVE_LOGIN_SHELL=yes
+if [ "$HAVE_LOGIN_SHELL" != "yes" ]; then
+ export HAVE_LOGIN_SHELL=yes
+ case $SHELL in
+ */csh|*/tcsh)
+ # [t]cshrc is always sourced automatically.
+ # Note that sourcing csh.login after .cshrc is non-standard.
+ exec $SHELL -c "if (-f /etc/csh.login) source /etc/csh.login; if (-f ~/.login) source ~/.login; exec $0 $*"
+ ;;
+ *)
exec $SHELL -l $0 $*
- fi
- unset HAVE_LOGIN_SHELL
-esac
+ esac
+fi
+unset HAVE_LOGIN_SHELL
# Call standard xinit actions
. /etc/X11/xinit/xinitdefs