Browse Source

sysfiles: changed /etc/profile to use $UID -eq 0 instead of -w / to support read-only roots

stable/0.6
Alejandro Mery 16 years ago committed by Christian Wiese
parent
commit
56b6f0d98d
  1. 22
      base/sysfiles/overlay.d/etc_profile.txt

22
base/sysfiles/overlay.d/etc_profile.txt

@ -1,7 +1,7 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../sysfiles/etc_profile.txt
# Filename: package/.../sysfiles/overlay.d/etc_profile.txt
# Copyright (C) 2006 - 2009 The OpenSDE Project
# Copyright (C) 1998 - 2003 Clifford Wolf
#
@ -36,9 +36,15 @@ export PATH
#
if [ "$PS1" ] ; then
PS1='$ ' ; PS2='> ' ; PS4='+ '
[ "$BASH_VERSION" ] && PS1='\u@\h:\w\$ '
[ "$KSH_VERSION" -a -w / ] && PS1='$USER:$PWD# '
[ "$KSH_VERSION" -a ! -w / ] && PS1='$USER:$PWD$ '
if [ -n "$BASH_VERSION" ]; then
PS1='\u@\h:\w\$ '
elif [ -n "$KSH_VERSION" ]; then
if [ $UID -eq 0 ]; then
PS1='$USER:$PWD# '
else
PS1='$USER:$PWD$ '
fi
fi
fi
# set some enviroment-variables
@ -69,8 +75,11 @@ if [ "$PS1" ] ; then
alias ...='cd ../..'
eval `dircolors -b /etc/dircolors`
[ -w / ] && alias ls="ls --color=auto -a" ||
alias ls="ls --color=auto"
if [ $UID -eq 0 ]; then
alias ls="ls --color=auto -a"
else
alias ls="ls --color=auto"
fi
alias l="ll -a" ; alias ll="ls -l"
alias which="type -p"
@ -83,4 +92,3 @@ for x in /etc/profile.d/* /etc/conf/profile ; do
[ -f $x ] && . $x
done
unset x

Loading…
Cancel
Save