blob: c616616ceede3864397c1e8b918178fc97b3ddc5 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
2# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
3
4PATH="/usr/local/bin:/usr/bin:/bin"
5EDITOR="vi" # needed for packages like cron, git-commit
6test -z "$TERM" && TERM="vt100" # Basic terminal capab. For screen etc.
7
Patrick Williamsc124f4f2015-09-15 14:41:29 -05008if [ "$HOME" = "ROOTHOME" ]; then
9 PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin
10fi
11if [ "$PS1" ]; then
12# works for bash and ash (no other shells known to be in use here)
13 PS1='\u@\h:\w\$ '
14fi
15
16if [ -d /etc/profile.d ]; then
Patrick Williamsc0f7c042017-02-23 20:41:17 -060017 for i in /etc/profile.d/*.sh ; do
18 if [ -f $i -a -r $i ]; then
19 . $i
20 fi
Patrick Williamsc124f4f2015-09-15 14:41:29 -050021 done
22 unset i
23fi
24
Patrick Williamsc0f7c042017-02-23 20:41:17 -060025if [ -x /usr/bin/resize ] && termpath="`tty`"; then
26 # Make sure we are on a serial console (i.e. the device used starts with /dev/tty),
27 # otherwise we confuse e.g. the eclipse launcher which tries do use ssh
28 case "$termpath" in
Brad Bishop37a0e4d2017-12-04 01:01:44 -050029 /dev/tty[A-z]*) resize >/dev/null
Patrick Williamsc0f7c042017-02-23 20:41:17 -060030 esac
Patrick Williamsc124f4f2015-09-15 14:41:29 -050031fi
32
33export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM
34
35umask 022