Subversion Repositories ALCASAR

Rev

Rev 47 | Rev 247 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

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