d60a22a0a835fdf30c4ff659852090b2f97cb0c8
[hdw-linux/hdw-linux.git] / misc / sysfiles / etc / profile
1 # hdw - linux /etc/profile      (copied from ROCK Linux)
2 #
3
4 # set the PATH-variable
5
6 if [ -w / ] ; then
7         PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
8         for x in /usr/X11/sbin /usr/X11/bin /usr/games /usr/local/games \
9                  /opt/*/sbin /opt/*/bin $HOME/sbin $HOME/bin
10         do
11                 [ -d $x ] && export PATH="$PATH:$x"
12         done
13 else
14         PATH='/bin:/usr/bin:/usr/local/bin'
15         for x in /usr/X11/bin /usr/games /usr/local/games /opt/*/bin $HOME/bin
16         do
17                 [ -d $x ] && export PATH="$PATH:$x"
18         done
19 fi
20 export PATH
21
22 # set the prompts for bash and ksh
23
24 if [ ".$BASH" != . ] ; then
25         export PS1='\u@\h:\w\$ '
26         export PS2='> ' ; export PS4='+ '
27 elif [ ".$KSH_VERSION" != . ] ; then
28         [ -w / ] && PS1='$USER:$PWD# ' || PS1='$USER:$PWD$ '
29         export PS2='> ' ; export PS4='+ '
30 fi
31
32 # set some enviroment-variables
33
34 if [ ".$SHELL" = "./bin/sh" ] ; then
35         export "SHELL=/bin/bash"
36 fi
37
38 export EDITOR="vi"
39 export PAGER="less"
40 export BLOCKSIZE=K
41
42 # set the MANPATH variable
43
44 MANPATH=/usr/share/man
45 for x in /usr/X11/man /usr/local/man /usr/local/share/man /opt/*/man
46 do [ -d $x ] && export MANPATH="$MANPATH:$x" ; done
47
48 # set the INFOPATH variable
49
50 INFOPATH=/usr/share/info
51 for x in /usr/X11/info /usr/local/info /usr/local/share/info /opt/*/info
52 do [ -d $x ] && export INFOPATH="$INFOPATH:$x" ; done
53
54 # set colors for ls
55 eval `dircolors -b /etc/dircolors`
56
57 # some usefull aliases (only if this is an interactive shell)
58
59 if [ "$PS1" ] ; then
60         alias -- +='pushd .'
61         alias -- -='popd'
62         alias ..='cd ..'
63         alias ...='cd ../..'
64
65         alias l="ll -a"
66         alias ll="ls -l"
67         if [ -w / ] ; then
68                 alias ls="ls --color=auto -a"
69         else
70                 alias ls="ls --color=auto"
71         fi
72
73         alias which="type -p"
74         alias rehash="hash -r"
75 fi
76
77 # include local profiles
78
79 for x in /etc/profile.d/* /etc/conf/profile ; do
80         [ -f $x ] && . $x
81 done
82 unset x