blob: 9e4283e0c74b6171ca70895304083de4cf51d546 [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
Brad Bishopd7bf8c12018-02-25 22:55:05 -05006[ "$TERM" ] || TERM="vt100" # Basic terminal capab. For screen etc.
Patrick Williamsc124f4f2015-09-15 14:41:29 -05007
Brad Bishopd7bf8c12018-02-25 22:55:05 -05008# Add /sbin & co to $PATH for the root user
9[ "$HOME" != "ROOTHOME" ] || PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin
10
11# Set the prompt for bash and ash (no other shells known to be in use here)
12[ -z "$PS1" ] || PS1='\u@\h:\w\$ '
Patrick Williamsc124f4f2015-09-15 14:41:29 -050013
14if [ -d /etc/profile.d ]; then
Brad Bishop6e60e8b2018-02-01 10:27:11 -050015 for i in /etc/profile.d/*.sh; do
16 if [ -f $i -a -r $i ]; then
17 . $i
18 fi
19 done
20 unset i
Patrick Williamsc124f4f2015-09-15 14:41:29 -050021fi
22
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080023# Make sure we are on a serial console (i.e. the device used starts with
24# /dev/tty[A-z]), otherwise we confuse e.g. the eclipse launcher which tries do
25# use ssh
26case $(tty 2>/dev/null) in
27 /dev/tty[A-z]*) [ -x @BINDIR@/resize ] && @BINDIR@/resize >/dev/null;;
28esac
Patrick Williamsc124f4f2015-09-15 14:41:29 -050029
30export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM
31
32umask 022