Annotation of /trunk/magellan-initscripts/etc/profile
Parent Directory | Revision Log
Revision 792 -
(hide annotations)
(download)
Thu Jan 8 20:31:43 2009 UTC (15 years, 8 months ago) by niro
File size: 1082 byte(s)
Thu Jan 8 20:31:43 2009 UTC (15 years, 8 months ago) by niro
File size: 1082 byte(s)
-be more sudo friendly and export */sbin pathes for normal users
1 | niro | 129 | # /etc/profile: system-wide .profile file for bourne compatible shells |
2 | niro | 792 | # $Header: /home/cvsd/magellan-cvs/magellan-src/magellan-initscripts/etc/profile,v 1.3 2009-01-08 20:31:43 niro Exp $ |
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 | source /etc/rc.config 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 |
Properties
Name | Value |
---|---|
svn:executable | * |