On Thu, 7 Sep 2006 11:19:16 +0300 "Angel Tsankov"
<[EMAIL PROTECTED]> wrote:

> (as root): echo 'echo $PATH' | su glibc
> /bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
> 
> (as root): su glibc
> package glibc:/usr/src/glibc> echo $PATH
> /usr/lib/pkgusr:/bin:/usr/bin:/tools/bin
> 
> I am using the first approach to automate the LFS build process. It
> looks like in this case the .bash_profile file is not read. Why? 

The section INVOCATION of the bash manpage will tell you exactly what
files bash sources when. An excerpt (emphasis added):

"[...]An interactive shell is one started without non-option  arguments 
and without       the  -c  option whose STANDARD INPUT and
output are both CONNECTED TO TERMINALS[...]"


So because in your case standard input is connected to a pipe, bash is
started in non-interactive mode. In non-interactive mode it doesn't read
.bash_profile unless specifically instructed to do so. Read the bash
manpage for details.

MSB

-- 
A man without light need not fear darkness.

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to