profile.d: Don't return from a sourced script (Debian: #741657)

This commit is contained in:
Ville Skyttä 2014-03-16 13:29:42 +02:00
parent 293bbaaa90
commit 867282a734

View File

@ -1,5 +1,5 @@
# Check for interactive bash and that we haven't already been sourced.
[ -z "$BASH_VERSION" -o -z "$PS1" -o -n "$BASH_COMPLETION_COMPAT_DIR" ] && return
if [ -n "$BASH_VERSION" -a -n "$PS1" -a -z "$BASH_COMPLETION_COMPAT_DIR" ]; then
# Check for recent enough version of bash.
bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
@ -12,3 +12,5 @@ if [ $bmajor -gt 4 ] || [ $bmajor -eq 4 -a $bminor -ge 1 ]; then
fi
fi
unset bash bmajor bminor
fi