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