Created
April 30, 2019 06:55
-
-
Save AndiH/d4e597aedb2a31d2501a626db504fe11 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
_SYSTEMNAME=$(cat /etc/FZJ/systemname) | |
USERSHELL=/bin/zsh | |
case $_SYSTEMNAME in | |
juron) | |
export SYSTEMNAME="JURON" | |
;; | |
juwels) | |
export SYSTEMNAME="JUWELS" | |
;; | |
jureca) | |
export SYSTEMNAME="JURECA" | |
;; | |
*) | |
echo "System not yet configured for use with zsh" | |
;; | |
esac | |
if [[ $SYSTEMNAME = JURECA ]]; then | |
export PATH=$HOME/shared/software/bin/:$PATH | |
USERSHELL=`which zsh` | |
fi | |
if [ -z "$LOADLBATCH" -a -e "${USERSHELL}" ]; then | |
if [[ -n $SYSTEMNAME ]]; then | |
if [ "$XDM" = "" -a "$KDE_FULL_SESSION" = "" -a "$DTUSERSESSION" = "" ]; then | |
# ssh or telnet | |
SHELL=$USERSHELL ; exec $USERSHELL -l | |
else | |
# XDM, KDE or CDE | |
SHELL=$USERSHELL ; exec $USERSHELL -l & | |
fi | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment