diff --git a/bash/bash_environment b/bash/bash_environment index 86d110c..16861df 100644 --- a/bash/bash_environment +++ b/bash/bash_environment @@ -32,12 +32,13 @@ export LANG LANGUAGE LC_CTYPE LC_ALL # Get rid of mail notification unset MAILCHECK -# Configure a set of useful variables for the prompt +# Configure a set of useful variables if [[ "`echo $UNAME | grep -c -i -e '^.*bsd$'`" == "1" ]] ; then - DOMAIN=`hostname | cut -d '.' -f 2` + FQDN=`hostname` else - DOMAIN=`hostname -f | cut -d '.' -f 2` + FQDN=`hostname -f` fi +DOMAIN=`echo $FQDN | cut -d '.' -f 2` # ---------------------------------------------------------------------- # SHELL TYPE @@ -120,7 +121,7 @@ export TSOCKS_CONF_FILE=~/.dotfiles/tsocks/tsocks.conf # GRID5000 specific # ---------------------------------------------------------------------- -if [[ "$DOMAIN" = "luxembourg" ]] ; then +if [[ -n "`echo $FQDN | grep -o .grid5000.fr`" ]] ; then export OAR_JOB_KEY_FILE=~/.ssh/id_rsa export HTTP_PROXY=http://proxy:3128 export HTTPS_PROXY=$HTTP_PROXY