# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). PATH="/usr/local/bin:/usr/bin:/bin" [ "$TERM" ] || TERM="vt100" # Basic terminal capab. For screen etc. # Add /sbin & co to $PATH for the root user, found by uid: init starts the console shell with HOME=/ [ "$(id -u)" != 0 ] || PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin # A HOME of / is the one init passed down: use the home /etc/passwd names for this uid if [ "${HOME:-/}" = / ]; then _home=$(_uid=$(id -u) while IFS=: read -r _n _p _u _g _c _h _s; do [ "$_u" = "$_uid" ] && { echo "$_h"; break; } done < /etc/passwd) [ -d "$_home" ] && HOME=$_home && export HOME unset _home fi # Set the prompt for bash and ash (no other shells known to be in use here) [ -z "$PS1" ] || PS1='\u@\h:\w\$ ' if [ -d /etc/profile.d ]; then for i in /etc/profile.d/*.sh; do if [ -f $i -a -r $i ]; then . $i fi done unset i fi if [ -z "$EDITOR" ]; then EDITOR="vi" # needed for packages like cron, git-commit fi export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM umask 022