xref: /freebsd/bin/sh/profile (revision 783d3ff6d7fae619db8a7990b8a6387de0c677b5)
1#
2# System-wide .profile file for sh(1).
3#
4# For the setting of languages and character sets please see
5# login.conf(5) and in particular the charset and lang options.
6# For full locales list check /usr/share/locale/*
7# You should also read the setlocale(3) man page for information
8# on how to achieve more precise control of locale settings.
9#
10# Check system messages
11# msgs -q
12# Allow terminal messages
13# mesg y
14
15# Load each .sh file in /etc/profile.d/, then /usr/local/etc/profile,
16# then each .sh file in /usr/local/etc/profile.d/.
17_loaded=${_loaded:-/etc/profile}
18export _loaded
19for _dir in /etc /usr/local/etc ; do
20	for _file in "${_dir}"/profile "${_dir}"/profile.d/*.sh ; do
21		if [ -f "${_file}" ] ; then
22			case :${_loaded}: in
23			*:"${_file}":*)
24				;;
25			*)
26				_loaded="${_loaded:+${_loaded}:}${_file}"
27				. "${_file}"
28				;;
29			esac
30		fi
31	done
32done
33unset _loaded _dir _file
34