Lines 3-23
Link Here
|
3 |
|
3 |
|
4 |
if [ -e "/etc/profile.env" ] |
4 |
if [ -e "/etc/profile.env" ] |
5 |
then |
5 |
then |
6 |
source /etc/profile.env |
6 |
. /etc/profile.env |
7 |
fi |
7 |
fi |
8 |
|
8 |
|
9 |
#077 would be more secure, but 022 is generally quite realistic |
9 |
#077 would be more secure, but 022 is generally quite realistic |
10 |
umask 022 |
10 |
umask 022 |
11 |
|
11 |
|
12 |
if [ `/usr/bin/whoami` = 'root' ] |
12 |
if [ $(/usr/bin/whoami) = root ] |
13 |
then |
13 |
then |
14 |
if [ "$SHELL" = '/bin/bash' ] || [ "$SHELL" = '/bin/sh' ] |
14 |
if [ "$BASH" ] |
15 |
then |
15 |
then |
16 |
export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]' |
16 |
export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]' |
17 |
fi |
17 |
fi |
18 |
export PATH="/bin:/sbin:/usr/bin:/usr/sbin:${ROOTPATH}" |
18 |
export PATH="/bin:/sbin:/usr/bin:/usr/sbin:${ROOTPATH}" |
19 |
else |
19 |
else |
20 |
if [ "$SHELL" = '/bin/bash' ] || [ "$SHELL" = '/bin/sh' ] |
20 |
if [ "$BASH" ] |
21 |
then |
21 |
then |
22 |
export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]' |
22 |
export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]' |
23 |
fi |
23 |
fi |
Lines 25-30
Link Here
|
25 |
fi |
25 |
fi |
26 |
unset ROOTPATH |
26 |
unset ROOTPATH |
27 |
|
27 |
|
28 |
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then |
28 |
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ] |
|
|
29 |
then |
29 |
export INPUTRC="/etc/inputrc" |
30 |
export INPUTRC="/etc/inputrc" |
30 |
fi |
31 |
fi |
|
|
32 |
|