diff --git a/bin/sh/profile b/bin/sh/profile --- a/bin/sh/profile +++ b/bin/sh/profile @@ -13,17 +13,12 @@ # Allow terminal messages # mesg y -# Load each file in /etc/profile.d/, then /usr/local/etc/profile, then -# each file in /usr/local/etc/profile.d/. +# Load each .sh file in /etc/profile.d/, then /usr/local/etc/profile, +# then each .sh file in /usr/local/etc/profile.d/. _loaded=${_loaded:-/etc/profile} export _loaded for _dir in /etc /usr/local/etc ; do - for _file in "${_dir}"/profile "${_dir}"/profile.d/* ; do - case ${_file} in - *[~#]|*.OLD|*.bak|*.orig|*,v) - continue - ;; - esac + for _file in "${_dir}"/profile "${_dir}"/profile.d/*.sh ; do if [ -f "${_file}" ] ; then case :${_loaded}: in *:"${_file}":*)