/[baselayout]/trunk/etc/profile
Gentoo

Contents of /trunk/etc/profile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 347 - (show annotations) (download)
Tue Apr 8 14:12:56 2003 UTC (16 years, 2 months ago) by azarah
File size: 1033 byte(s)
Do not set PS1 for dumb terminal, bug #18886

1 # /etc/profile:
2 # $Header$
3
4 if [ -e "/etc/profile.env" ]
5 then
6 . /etc/profile.env
7 fi
8
9 # 077 would be more secure, but 022 is generally quite realistic
10 umask 022
11
12 if [ "`/usr/bin/whoami`" = 'root' ]
13 then
14 # Do not set PS1 for dumb terminals
15 if [ "$TERM" != 'dumb' ] && [ "$SHELL" = '/bin/bash' -o "$SHELL" = '/bin/sh' ]
16 then
17 export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]'
18 fi
19 export PATH="/bin:/sbin:/usr/bin:/usr/sbin:${ROOTPATH}"
20 else
21 # Do not set PS1 for dumb terminals
22 if [ "$TERM" != 'dumb' ] && [ "$SHELL" = '/bin/bash' -o "$SHELL" = '/bin/sh' ]
23 then
24 export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]'
25 fi
26 export PATH="/bin:/usr/bin:${PATH}"
27 fi
28 unset ROOTPATH
29
30 if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]
31 then
32 export INPUTRC="/etc/inputrc"
33 fi
34
35 # Extract the value of EDITOR
36 [ -z "$EDITOR" ] && EDITOR="`. /etc/rc.conf; echo $EDITOR`" 2>/dev/null
37 [ -z "$EDITOR" ] && EDITOR="`. /etc/conf.d/basic; echo $EDITOR`" 2>/dev/null
38 [ -z "$EDITOR" ] && EDITOR="/bin/nano"
39 export EDITOR

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20