Raw_recruit
06-30-2001, 10:49 PM
I can't find where in the manuals that tells how $PATH is initially
set from a boot-up and then also what other scripts from then on
which might also be modifying $PATH.
The problem I'm trying to clear up is that my $PATH has got
several duplicate entries and I want to clean it up. But, I don't
know 'who' all is setting it up and 'who' all is making modifications
along the way.
I have looked in /etc/profile which contains the following:
if ! echo $PATH | /bin/grep -q "/usr/X11R6/bin" ; then
$PATH="$PATH:/usr/X11R6/bin"
fi
Also I added the following to /etc/profile:
PATH=$PATH:/usr/java/jdk1.3.1/bin
My question is, if /etc/profile is the first script to execute which
sets $PATH, then WHY is it testing it for the presence of a path
name if it isn't expecting $PATH to ALREADY have been set to
some value????? If there were to be something there,
(viz. "/usr/X11R6/bin") then /etc/profile could not have been the
first script to set $PATH.
The following is in my /root/.bash_profile (I am having this
symptom while logged in as root):
PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH:$HOME/bin
Also, I found PATH getting the following from /etc/rc.sysinit :
PATH=/bin:/sbin:/usr/bin:/usr/sbin
From boot-up, which script is the first to set up the default $PATH? I'm guessing /etc/rc.sysinit
From log-in, what other scripts may or will be run to modify the
default? Again, I'm guessing first /etc/profile followed by /$HOME/.bash_profile.
Are there others?
It is looking like perhaps one or more of
these scripts are being executed twice due
to paths showing up twice in the final $PATH.
I'm using RedHat 7.1
Thanks
Doug
:eek: :eek: :mad: :eek: :eek: :eek: :eek: :eek:
set from a boot-up and then also what other scripts from then on
which might also be modifying $PATH.
The problem I'm trying to clear up is that my $PATH has got
several duplicate entries and I want to clean it up. But, I don't
know 'who' all is setting it up and 'who' all is making modifications
along the way.
I have looked in /etc/profile which contains the following:
if ! echo $PATH | /bin/grep -q "/usr/X11R6/bin" ; then
$PATH="$PATH:/usr/X11R6/bin"
fi
Also I added the following to /etc/profile:
PATH=$PATH:/usr/java/jdk1.3.1/bin
My question is, if /etc/profile is the first script to execute which
sets $PATH, then WHY is it testing it for the presence of a path
name if it isn't expecting $PATH to ALREADY have been set to
some value????? If there were to be something there,
(viz. "/usr/X11R6/bin") then /etc/profile could not have been the
first script to set $PATH.
The following is in my /root/.bash_profile (I am having this
symptom while logged in as root):
PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH:$HOME/bin
Also, I found PATH getting the following from /etc/rc.sysinit :
PATH=/bin:/sbin:/usr/bin:/usr/sbin
From boot-up, which script is the first to set up the default $PATH? I'm guessing /etc/rc.sysinit
From log-in, what other scripts may or will be run to modify the
default? Again, I'm guessing first /etc/profile followed by /$HOME/.bash_profile.
Are there others?
It is looking like perhaps one or more of
these scripts are being executed twice due
to paths showing up twice in the final $PATH.
I'm using RedHat 7.1
Thanks
Doug
:eek: :eek: :mad: :eek: :eek: :eek: :eek: :eek: