avraham.rosenberg wrote on 2003-09-10:
> 4- Are you certain that the root path is undefined unless one define it in
> the /root/.profile file? I am pretty sure it is devined, or built
> gradually in the phases of the init process. I cannot swear for debian,
> but I have a slackware 8.0 installation which I am only rarely using in
> which there is no /root/.bashrc, /root/.profile, or /root/.bash_profile
> file but echo $PATH gives the complete right answer. I checked it 10
> minutes ago. I remember that, when trying to find the cause of the problem
> myself, in debian, I "grep-ed" in /etc some files which set or appended
> directories to the path. I would "buy" gladly your explanation, but I am
> affraid you are wrong.
>
On Red Hat it's defined in `/etc/profile`::
if [ `id -u` = 0 ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
fi
(`pathmunge` is a function defined before that, it prepends it to the
path if not part of it already). But `/etc/profile` isn't any part of
the init process (process 1). It's a system-wide script used by sh
(and bash) whenever called as login shells (e.g. from ``su -l``). Or
did you mean mean bash's "init process" - but than `~/.profile` is
also part of it, just as per-user one.
--
Beni Cherniavsky <[EMAIL PROTECTED]>
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]