]>
Commit | Line | Data |
---|---|---|
9bfefe38 | 1 | # /etc/profile |
2 | ||
3 | # System wide environment and startup programs | |
99306191 | 4 | # Functions and aliases go into the shells dependent startup files |
9bfefe38 | 5 | |
6 | PATH="$PATH:/usr/X11R6/bin" | |
9bfefe38 | 7 | |
9bfefe38 | 8 | if [ `id -gn` = `id -un` -a `id -u` -gt 14 ]; then |
731761c3 | 9 | umask 007 |
9bfefe38 | 10 | else |
731761c3 | 11 | umask 077 |
9bfefe38 | 12 | fi |
13 | ||
14 | USER=`id -un` | |
15 | LOGNAME=$USER | |
16 | MAIL="/var/spool/mail/$USER" | |
17 | ||
18 | HOSTNAME=`/bin/hostname` | |
19 | HISTSIZE=1000 | |
20 | HISTFILESIZE=1000 | |
99306191 | 21 | |
22 | # | |
23 | # Setup the environment for varius shells | |
24 | # | |
25 | ||
26 | case "${0#\-}" in | |
27 | ash) | |
28 | PS1="${HOSTNAME}\$ " | |
29 | ;; | |
30 | bash) | |
31 | PS1="\u@\h \W\\$ " | |
32 | ;; | |
33 | ksh|pdksh) | |
34 | PS1='[${LOGNAME-$USER}@${HOSTNAME}` | |
35 | if [ "$PWD" = "${PWD##$HOME}" ]; then | |
36 | echo $PWD; | |
37 | else | |
38 | echo '~'${PWD##$HOME}; | |
39 | fi`] '$PS1 | |
40 | PS2='> ' | |
41 | set -o emacs | |
42 | bind '^I'=complete | |
43 | # | |
44 | # Setup some of the most basic editing functions | |
45 | # to work properly under different termnal emulators. | |
46 | # | |
47 | case $TERM in | |
48 | nxterm|xterm|xterm-color|rxvt) | |
49 | bind '^[[H'=beginning-of-line | |
50 | bind '^[[F'=end-of-line | |
51 | ;; | |
52 | linux) | |
53 | bind '^[1~'=beginning-of-line | |
54 | bind '^[4~'=end-of-line | |
55 | ;; | |
56 | esac | |
57 | ;; | |
58 | zsh) | |
59 | PS1="%m:%~%# " | |
60 | ;; | |
61 | esac | |
62 | ||
63 | export PATH PS1 PS2 HOSTNAME HISTSIZE HISTFILESIZE USER LOGNAME MAIL | |
9bfefe38 | 64 | |
65 | for i in /etc/profile.d/*.sh ; do | |
66 | if [ -x $i ]; then | |
67 | . $i | |
68 | fi | |
69 | done | |
70 | ||
71 | unset i |