# /etc/profile for LRAUVs
#
# Some portions adapted by MJS from "Beyond Linux From Scratch"
#
# Sets system-wide environment variables.

# 256-color mode not supported on this host
if echo $TERM | grep -q -- '-256color'; then
    export TERM=`echo -n $TERM | sed 's/-256color//'`
#    echo -e "256-color mode not supported on this host, reverted TERM to $TERM."
fi

NORMAL="\[\e[0m\]"
RED="\[\e[1;31m\]"
GREEN="\[\e[1;32m\]"

if [ $EUID -eq 0 ] ; then
    export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
    unset HISTFILE
    PS1="$RED[\u@\h] $NORMAL\w$RED # $NORMAL"
else
    export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
    export HISTSIZE=127
    PS1="$GREEN[\u@\h] $NORMAL\w$GREEN $ $NORMAL"
fi

export LD_LIBRARY_PATH=/usr/local/lib

