|
|
@ -20,15 +20,18 @@ |
|
|
|
# |
|
|
|
# --- ROCK-COPYRIGHT-NOTE-END --- |
|
|
|
|
|
|
|
# determine the effective user id |
|
|
|
EUID="$( id -u )" |
|
|
|
|
|
|
|
# set the PATH-variable |
|
|
|
export PATH="" |
|
|
|
for _bindir in $HOME/bin /usr/local/bin /usr/bin /bin /usr/X11/bin \ |
|
|
|
for _bindir in $HOME${HOME:+/bin} /usr/local/bin /usr/bin /bin /usr/X11/bin \ |
|
|
|
/usr/games /usr/local/games /opt/*/bin /opt/*/games |
|
|
|
do |
|
|
|
if [ -d "$_bindir" ]; then |
|
|
|
PATH="$PATH${PATH:+:}$_bindir" |
|
|
|
fi |
|
|
|
if [ -w / ]; then |
|
|
|
if [ -w / -o "$EUID" == 0 ]; then |
|
|
|
_sbindir=${_bindir/%\/bin/\/sbin} |
|
|
|
if [ "$_bindir" != "$_sbindir" -a -d "$_sbindir" ]; then |
|
|
|
PATH="$PATH${PATH:+:}$_sbindir" |
|
|
@ -94,5 +97,5 @@ for x in /etc/profile.d/* /etc/conf/profile ; do |
|
|
|
[[ $x == *.csh ]] && continue |
|
|
|
[ -f $x ] && . $x |
|
|
|
done |
|
|
|
unset x |
|
|
|
|
|
|
|
unset EUID x |