Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | # /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) |
| 2 | # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). |
| 3 | |
| 4 | PATH="/usr/local/bin:/usr/bin:/bin" |
| 5 | EDITOR="vi" # needed for packages like cron, git-commit |
| 6 | test -z "$TERM" && TERM="vt100" # Basic terminal capab. For screen etc. |
| 7 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 8 | if [ "$HOME" = "ROOTHOME" ]; then |
| 9 | PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin |
| 10 | fi |
| 11 | if [ "$PS1" ]; then |
| 12 | # works for bash and ash (no other shells known to be in use here) |
| 13 | PS1='\u@\h:\w\$ ' |
| 14 | fi |
| 15 | |
| 16 | if [ -d /etc/profile.d ]; then |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 17 | for i in /etc/profile.d/*.sh ; do |
| 18 | if [ -f $i -a -r $i ]; then |
| 19 | . $i |
| 20 | fi |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 21 | done |
| 22 | unset i |
| 23 | fi |
| 24 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 25 | if [ -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 Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame^] | 29 | /dev/tty[A-z]*) resize >/dev/null |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 30 | esac |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 31 | fi |
| 32 | |
| 33 | export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM |
| 34 | |
| 35 | umask 022 |