shell-base/install/files/root/.bash_profile

24 lines
842 B
Bash

# This .bash_profile is for use ONLY! with UCI bash shell system
# this is only sourced for login shell
# uncomment these for UCI Shell debugging.
# echo ---- sourcing system .bash_profile for user root ---
# [[ $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 ---------------------
if [[ $SHELL_INTERACTIVE ]]; then
# only source .bashrc if interactive login shell
[[ -f "/root/.bashrc" ]] && source "/root/.bashrc"
else
# non-interactive root login commands
export PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin
fi
# any (interactive or not) root login shell commands can go here.