18 lines
710 B
Bash
18 lines
710 B
Bash
#!/bin/bash
|
|
# uncomment these for debugging.
|
|
# echo ---- sourcing system wide bash.bashrc ---
|
|
# [ $EUID -eq 0 ] && echo 'Root User' || echo 'Non Root User'
|
|
# [[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'
|
|
# shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'
|
|
# ([ -n "$SSH_CONNECTION" ] || [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]) && echo ssh remote user || echo local user
|
|
# echo ---------------------
|
|
|
|
if ([ -n "$SSH_CONNECTION" ] || [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]); then
|
|
export SSH_SESSION=true
|
|
source /etc/profile
|
|
fi
|
|
# global debug on or off via debug_on debug_off aliases
|
|
# can add this export to any file
|
|
#export BASH_DEBUG=true
|
|
source $BASH_SHELL_LOAD
|