CVS_RSH defaults to ssh (etc/profile)
[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 export CVS_RSH="ssh"
42
43 # set the MANPATH variable
44
45 MANPATH=/usr/share/man
46 for x in /usr/X11/man /usr/local/man /usr/local/share/man /opt/*/man
47 do [ -d $x ] && export MANPATH="$MANPATH:$x" ; done
48
49 # set the INFOPATH variable
50
51 INFOPATH=/usr/share/info
52 for x in /usr/X11/info /usr/local/info /usr/local/share/info /opt/*/info
53 do [ -d $x ] && export INFOPATH="$INFOPATH:$x" ; done
54
55 # set colors for ls
56 eval `dircolors -b /etc/dircolors`
57
58 # some usefull aliases (only if this is an interactive shell)
59
60 if [ "$PS1" ] ; then
61         alias -- +='pushd .'
62         alias -- -='popd'
63         alias ..='cd ..'
64         alias ...='cd ../..'
65
66         alias l="ll -a"
67         alias ll="ls -l"
68         if [ -w / ] ; then
69                 alias ls="ls --color=auto -a"
70         else
71                 alias ls="ls --color=auto"
72         fi
73
74         alias which="type -p"
75         alias rehash="hash -r"
76 fi
77
78 # include local profiles
79
80 for x in /etc/profile.d/* /etc/conf/profile ; do
81         [ -f $x ] && . $x
82 done
83 unset x