don't run profile startup script if user is logged in via su command
parent
ffecdd9501
commit
ff1d4c11be
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue