Subversion Repositories ALCASAR

Rev

Rev 247 | Details | Compare with Previous | Last modification | View Log

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