# /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. # The uid, once: bash has it as EUID, other shells ask id. Every program # started here costs the console's first prompt about 0.1 s. if [ -n "${BASH_VERSION-}" ]; then _uid=$EUID else _uid=$(id -u) fi # Add /sbin & co to $PATH for the root user, found by uid: init starts the console shell with HOME=/ [ "$_uid" != 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 while IFS=: read -r _n _p _u _g _c _h _s; do if [ "$_u" = "$_uid" ]; then [ -d "$_h" ] && HOME=$_h && export HOME break fi done < /etc/passwd unset _n _p _u _g _c _h _s fi unset _uid # 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