Subversion Repositories ALCASAR

Rev

Rev 40 | Rev 57 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
1 root 1
# /etc/bashrc
2
 
3
# System wide functions and aliases
4
# Environment stuff goes in /etc/profile
5
 
6
# by default, we want this to get set.
7
# Even for non-interactive, non-login shells.
8
if [ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]; then
9
	umask 002
10
else
11
	umask 022
12
fi
13
 
14
# are we an interactive shell?
15
if [ "$PS1" ]; then
16
    case $TERM in
17
	xterm*)
18
	    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
19
	    ;;
20
	*)
21
	    ;;
22
    esac
47 franck 23
 
24
#    [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "	# default
25
# met un peu de couleur sur le compte 'root'
1 root 26
    if [ `id -un` = root ]; then
27
        PS1='\[\033[1;31m\]\h:\w\$\[\033[0m\] '
28
        else
29
        PS1='\[\033[1;30m\]\h:\w\$\[\033[0m\] '
30
    fi
31
 
32
 
33
    if [ -z "$loginsh" ]; then # We're not a login shell
34
	# Not all scripts in profile.d are compatible with other shells
35
	# TODO: make the scripts compatible or check the running shell by
36
	# themselves.
37
	if [ -n "${BASH_VERSION}${KSH_VERSION}${ZSH_VERSION}" ]; then
38
            for i in /etc/profile.d/*.sh; do
39
	        if [ -x $i ]; then
40
	            . $i
41
	        fi
42
	    done
43
	    unset i
44
	fi
45
    fi
46
fi
47
 
48
unset loginsh