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