Changeset View
Changeset View
Standalone View
Standalone View
bin/sh/profile
# $FreeBSD$ | # $FreeBSD$ | ||||
# | # | ||||
# System-wide .profile file for sh(1). | # System-wide .profile file for sh(1). | ||||
# | # | ||||
# For the setting of languages and character sets please see | # For the setting of languages and character sets please see | ||||
# login.conf(5) and in particular the charset and lang options. | # login.conf(5) and in particular the charset and lang options. | ||||
# For full locales list check /usr/share/locale/* | # For full locales list check /usr/share/locale/* | ||||
# You should also read the setlocale(3) man page for information | # You should also read the setlocale(3) man page for information | ||||
# on how to achieve more precise control of locale settings. | # on how to achieve more precise control of locale settings. | ||||
# | # | ||||
# Check system messages | # Check system messages | ||||
# msgs -q | # msgs -q | ||||
# Allow terminal messages | # Allow terminal messages | ||||
# mesg y | # mesg y | ||||
# Load each file in /etc/profile.d/, then /usr/local/etc/profile, then | # Load each .sh file in /etc/profile.d/, then /usr/local/etc/profile, | ||||
# each file in /usr/local/etc/profile.d/. | # then each .sh file in /usr/local/etc/profile.d/. | ||||
_loaded=${_loaded:-/etc/profile} | _loaded=${_loaded:-/etc/profile} | ||||
export _loaded | export _loaded | ||||
for _dir in /etc /usr/local/etc ; do | for _dir in /etc /usr/local/etc ; do | ||||
for _file in "${_dir}"/profile "${_dir}"/profile.d/* ; do | for _file in "${_dir}"/profile "${_dir}"/profile.d/*.sh ; do | ||||
case ${_file} in | |||||
*[~#]|*.OLD|*.bak|*.orig|*,v) | |||||
continue | |||||
;; | |||||
esac | |||||
if [ -f "${_file}" ] ; then | if [ -f "${_file}" ] ; then | ||||
case :${_loaded}: in | case :${_loaded}: in | ||||
*:"${_file}":*) | *:"${_file}":*) | ||||
;; | ;; | ||||
*) | *) | ||||
_loaded="${_loaded:+${_loaded}:}${_file}" | _loaded="${_loaded:+${_loaded}:}${_file}" | ||||
. "${_file}" | . "${_file}" | ||||
;; | ;; | ||||
esac | esac | ||||
fi | fi | ||||
done | done | ||||
done | done | ||||
unset _loaded _dir _file | unset _loaded _dir _file |