28 lines
889 B
Bash
28 lines
889 B
Bash
#!/bin/bash
|
|
# sourced for bash login shell only
|
|
|
|
# uncomment these for debugging.
|
|
# echo ---- sourcing system .bash_profile for user $USER ---
|
|
# [[ $USER_ROOT ]] && echo 'Root User' || echo 'Non Root User'
|
|
# [[ $SHELL_INTERACTIVE ]] && echo 'Interactive' || echo 'Not interactive'
|
|
# [[ $SHELL_LOGIN ]] && echo 'Login shell' || echo 'Not login shell'
|
|
# [[ $SSH_SESSION ]] && echo ssh remote user || echo local user
|
|
# env | grep BASH
|
|
# echo ---------------------
|
|
|
|
|
|
# only source .bashrc if interactive login shell
|
|
if [[ $SHELL_INTERACTIVE ]];then
|
|
[[ -f "$HOME/.bashrc" ]] && source "$HOME/.bashrc"
|
|
else
|
|
export PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin
|
|
fi
|
|
|
|
|
|
# delete?
|
|
# only source .bashrc if interactive login shell
|
|
# if [[ $SHELL_INTERACTIVE ]]; then
|
|
# [[ -f "/root/.bashrc" ]] && source "/root/.bashrc"
|
|
# else
|
|
# export PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin
|
|
# fi |