#!/bin/bash # main /etc/profile loaded for all logins # more info see http://www.linuxfromscratch.org/blfs/view/svn/postlfs/profile.html # Set the initial path export PATH=/bin:/usr/bin # uncomment for debugging echo system profile /etc/profile sourced at login # put no script code directly here. # organize all script code in files /etc/profile.d # sourcing if [[ $- == *i* ]] && [[ $EUID -ne 0 ]]; then echo non root interactive login shell, will not source /etc/profile.d if [[ $FORCE_LOAD_BASH_SHELL_BASE ]]; then echo "forcing source of shell base: $BASH_SHELL_BASE/$BASH_SHELL_LOAD" source "$BASH_SHELL_BASE/$BASH_SHELL_LOAD" else BASH_SHELL_BASE_SOURCED=false NORMAL="\[\e[0m\]" RED="\[\e[1;31m\]" GREEN="\[\e[1;32m\]" PS1="$GREEN\u [ $NORMAL\w$GREEN ]\$ $NORMAL" unset RED GREEN NORMAL fi else echo sourcing /etc/profile.d if [ -d /etc/profile.d ]; then for i in /etc/profile.d/*.sh; do if [ -r $i ]; then source $i fi done unset i fi fi