aboutsummaryrefslogtreecommitdiff
path: root/bin/sh/profile
blob: ee0879a13e0b069081946ca302094f4a5bd5b84b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#
# System-wide .profile file for sh(1).
#
# For the setting of languages and character sets please see
# login.conf(5) and in particular the charset and lang options.
# For full locales list check /usr/share/locale/*
# You should also read the setlocale(3) man page for information
# on how to achieve more precise control of locale settings.
#
# Check system messages
# msgs -q
# Allow terminal messages
# mesg y

# 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/*.sh ; do
		if [ -f "${_file}" ] ; then
			case :${_loaded}: in
			*:"${_file}":*)
				;;
			*)
				_loaded="${_loaded:+${_loaded}:}${_file}"
				. "${_file}"
				;;
			esac
		fi
	done
done
unset _loaded _dir _file