# /etc/profile: login shell environment for all users.
# Local additions belong in /etc/profile.d/*.sh, not here.

umask 022

append_path() {
    case ":$PATH:" in
        *:"$1":*) ;;
        *) PATH="${PATH:+$PATH:}$1" ;;
    esac
}
append_path /usr/local/bin
append_path /usr/bin
export PATH
unset -f append_path

if [ -d /etc/profile.d ]; then
    for profile in /etc/profile.d/*.sh; do
        [ -r "$profile" ] && . "$profile"
    done
    unset profile
fi

# Interactive bash login shells also read the system bashrc.
if [ -n "${BASH_VERSION-}" ] && [ -n "${PS1-}" ] && [ -z "${POSIXLY_CORRECT-}" ] \
        && [ "${0#-}" != sh ] && [ -r /etc/bash.bashrc ]; then
    . /etc/bash.bashrc
fi
