diff --git a/setup/etc/profile.d/03-startup.sh b/setup/etc/profile.d/03-startup.sh index fd2104e..29ac0b9 100755 --- a/setup/etc/profile.d/03-startup.sh +++ b/setup/etc/profile.d/03-startup.sh @@ -1,5 +1,6 @@ # this runs startups for bash shell base system - if [ "$SHELL" = "/bin/bash" ] && [ "${BASH_SHELL_STARTUP}" ]; then + # don't run statup if user logs in via su + if [ "$SHELL" = "/bin/bash" ] && [ "${BASH_SHELL_STARTUP}" ] && [ "$(ps -o comm= $PPID)" != "su" ]; then # uncomment for debugging if [[ -f $BASH_SHELL_STARTUP ]] && [[ $EUID -ne 0 ]]; then llog "running startup script $BASH_SHELL_STARTUP async"