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 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 6 | [ "$TERM" ] || TERM="vt100" # Basic terminal capab. For screen etc. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 7 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 8 | # 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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 13 | |
| 14 | if [ -d /etc/profile.d ]; then |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 15 | 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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 21 | fi |
| 22 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 23 | # 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 |
| 26 | case $(tty 2>/dev/null) in |
| 27 | /dev/tty[A-z]*) [ -x @BINDIR@/resize ] && @BINDIR@/resize >/dev/null;; |
| 28 | esac |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 29 | |
| 30 | export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM |
| 31 | |
| 32 | umask 022 |