From 0c41c184a74dfbc9e8f81a75f78508856ebaab88 Mon Sep 17 00:00:00 2001 From: Stefan Paletta Date: Sun, 10 Apr 2005 13:25:40 +0000 Subject: [PATCH] Stefan Paletta: * sysfiles: construct $PATH in reverse order, so e.g. /usr/local/bin overrides /usr/bin and /bin ignore *.csh files in /etc/profile.d fix $PS1 for non-root users of Korn shell Index: package/base/sysfiles/etc_profile.txt =================================================================== [2005020717195314378] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@5889 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/base/sysfiles/etc_profile.txt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/package/base/sysfiles/etc_profile.txt b/package/base/sysfiles/etc_profile.txt index 3dcbe7d13..4b10bf26e 100644 --- a/package/base/sysfiles/etc_profile.txt +++ b/package/base/sysfiles/etc_profile.txt @@ -23,18 +23,18 @@ # set the PATH-variable if [ -w / ] ; then - PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin" - for x in /usr/X11/sbin /usr/X11/bin /usr/games /usr/local/games \ - /opt/*/sbin /opt/*/bin /opt/*/games $HOME/sbin $HOME/bin + PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + for x in /usr/X11/bin /usr/X11/sbin /usr/games /usr/local/games \ + /opt/*/bin /opt/*/sbin /opt/*/games $HOME/bin $HOME/sbin do - [ -d $x ] && export PATH="$PATH:$x" + [ -d $x ] && export PATH="$x:$PATH" done else - PATH='/bin:/usr/bin:/usr/local/bin' + PATH="/usr/local/bin:/usr/bin:/bin" for x in /usr/X11/bin /usr/games /usr/local/games \ /opt/*/bin /opt/*/games $HOME/bin do - [ -d $x ] && export PATH="$PATH:$x" + [ -d $x ] && export PATH="$x:$PATH" done fi export PATH @@ -45,7 +45,7 @@ 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# ' + [ "$KSH_VERSION" -a ! -w / ] && PS1='$USER:$PWD$ ' fi # set some enviroment-variables @@ -93,6 +93,7 @@ fi # include local profiles # for x in /etc/profile.d/* /etc/conf/profile ; do + [[ $x == *.csh ]] && continue [ -f $x ] && . $x done unset x