Magellan Linux

Annotation of /trunk/initscripts/common/etc/profile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1357 - (hide annotations) (download)
Sat Jun 4 21:05:40 2011 UTC (12 years, 11 months ago) by niro
File size: 1993 byte(s)
copied from original repos
1 niro 129 # /etc/profile: system-wide .profile file for bourne compatible shells
2 niro 929 # $Id$
3 niro 2
4     if [ -e "/etc/profile.env" ]
5     then
6     source /etc/profile.env
7     fi
8    
9 niro 129 # 077 would be more secure, but 022 is generally quite realistic
10 niro 2 umask 022
11    
12     if [ `/usr/bin/whoami` = 'root' ]
13     then
14     if [ "$SHELL" = '/bin/bash' ] || [ "$SHELL" = '/bin/sh' ]
15     then
16     export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]'
17     fi
18     export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:${ROOTPATH}"
19     else
20     if [ "$SHELL" = '/bin/bash' ] || [ "$SHELL" = '/bin/sh' ]
21     then
22     export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]'
23     fi
24 niro 792 export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:${PATH}"
25 niro 2 fi
26     unset ROOTPATH
27    
28     if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
29     export INPUTRC="/etc/inputrc"
30     fi
31    
32     if [ -z "$EDITOR" ]
33     then
34 niro 1357 source /etc/conf.d/editor 2> /dev/null
35 niro 129 # check if $EDITOR is still zero than use default
36 niro 2 if [ -z "${EDITOR}" ]
37     then
38     EDITOR="/usr/bin/nano"
39     fi
40     export EDITOR
41     fi
42 niro 1357
43     if [ -e "/etc/conf.d/locale" ]
44     then
45     source /etc/conf.d/locale
46    
47     [ -n "$LANG" ] && export LANG || unset LANG
48     [ -n "$LC_ADDRESS" ] && export LC_ADDRESS || unset LC_ADDRESS
49     [ -n "$LC_CTYPE" ] && export LC_CTYPE || unset LC_CTYPE
50     [ -n "$LC_COLLATE" ] && export LC_COLLATE || unset LC_COLLATE
51     [ -n "$LC_IDENTIFICATION" ] && export LC_IDENTIFICATION || unset LC_IDENTIFICATION
52     [ -n "$LC_MEASUREMENT" ] && export LC_MEASUREMENT || unset LC_MEASUREMENT
53     [ -n "$LC_MESSAGES" ] && export LC_MESSAGES || unset LC_MESSAGES
54     [ -n "$LC_MONETARY" ] && export LC_MONETARY || unset LC_MONETARY
55     [ -n "$LC_NAME" ] && export LC_NAME || unset LC_NAME
56     [ -n "$LC_NUMERIC" ] && export LC_NUMERIC || unset LC_NUMERIC
57     [ -n "$LC_PAPER" ] && export LC_PAPER || unset LC_PAPER
58     [ -n "$LC_TELEPHONE" ] && export LC_TELEPHONE || unset LC_TELEPHONE
59     [ -n "$LC_TIME" ] && export LC_TIME || unset LC_TIME
60     if [ -n "$LC_ALL" ]
61     then
62     if [ "$LC_ALL" != "$LANG" ]
63     then
64     export LC_ALL
65     else
66     unset LC_ALL
67     fi
68     else
69     unset LC_ALL
70     fi
71     fi

Properties

Name Value
svn:executable *