Subversion Repositories ALCASAR

Rev

Rev 1 | Rev 47 | 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
23
#    [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
24
    if [ `id -un` = root ]; then
25
        PS1='\[\033[1;31m\]\h:\w\$\[\033[0m\] '
26
        else
27
        PS1='\[\033[1;30m\]\h:\w\$\[\033[0m\] '
28
    fi
29
 
30
 
31
    if [ -z "$loginsh" ]; then # We're not a login shell
32
	# Not all scripts in profile.d are compatible with other shells
33
	# TODO: make the scripts compatible or check the running shell by
34
	# themselves.
35
	if [ -n "${BASH_VERSION}${KSH_VERSION}${ZSH_VERSION}" ]; then
36
            for i in /etc/profile.d/*.sh; do
37
	        if [ -x $i ]; then
38
	            . $i
39
	        fi
40
	    done
41
	    unset i
42
	fi
43
    fi
44
fi
45
 
46
unset loginsh