summaryrefslogtreecommitdiff
path: root/tree/etc/profile
blob: ed401a66b28dbb6db7c67b862216eb7ea6310a44 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
[ -x /usr/bin/vim ] && export EDITOR=${EDITOR:-/usr/bin/vim}
[ -x /usr/bin/less ] && export PAGER=${PAGER:-/usr/bin/less}


if [ $UID -eq 0 ]; then
  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  PS1="$(uname -n 2>/dev/null) # "
else
  PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
  PS1="$(whoami 2>/dev/null)@$(uname -n 2>/dev/null) \$ "
fi
export PATH


# Users don't want anyone else writing their files.  System applications allow
# their group-mates to write.
if [ $UID -gt 499 ]; then
  umask 022
else
  umask 002
fi


if [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then
  [ -f /etc/bash/bashrc ] && . /etc/bash/bashrc
fi


if [ -d /etc/profile.d ]; then
  for i in /etc/profile.d/*.sh; do
    [ -r $i ] && . $i
  done
  unset i
fi