the issue of environment value $PS1 set under Ubuntu 10.04

littlebat dashing.meng at gmail.com
Mon Jun 7 02:30:18 PDT 2010


> > Ubuntu bash has a bug, even if I specified --rcfile, it still read
> > /etc/bash.bashrc.
> 
> That's because /etc/profile does it explicitly:

I have replaced bash in Ubuntu with the bash comes with LFS6.6. I found there isn't a system-wide .bashrc file(just like /etc/bash.bashrc in Ubuntu 10.04) in LFS6.6 bash. So, when I specified --rcfile append to LFS6.6 bash, it works as its man page describes. But, under Ubuntu 10.04 bash, specified "--rcfile ~/mybashrc" append to bash, it will read and perform /etc/bash.bashrc and ~/mybashrc but without ~/.bashrc, it acts don't like its man page describes, so it is a bug ( https://bugs.launchpad.net/ubuntu/+source/bash/+bug/589496 ). 

If there isn't this bug in Ubuntu 10.04, specified "--rcfile ~lfs/.bashrc" will really solved this issue in spite of /etc/profile does it explicitly. Because ~lfs/.bash_profile will be read and be performed after /etc/profile (of course after /etc/bash.bashrc), the "env" command will set a empty environment, it clear all the environment values include the values set in /etc/bash.bashrc first.

> >> There are almost always ways to work around little problems.
> > I think, it isn't everyone know how to solve these lttle
> > problems(just like me), so the best way is give the right guide in
> > the LFS BOOK.
> 
> No, we really can't instruct for every possible combination of lack of 
> knowledge.  Having enough background in Linux to solve simple usage 
> problems like this is really a prerequisite for LFS.

No, I don't agree your point. As a book, it should be right at first. But, under my Ubuntu 10.04, It doesn't act right when I did exactly as LFS BOOK 6.6 says without a note such as "In some distributions, this instructions should be modified to archive the goal of getting a clear LFS building environment."

So, I suggest to add a note like above into LFS BOOK 6.6 or give an all right way to get a clear building environment. 

I am a LFS newbie but not a Linux newbie, so I think I can solved this issue at last. But, as a LFS BOOK, it really need to make it more wonderful.

Thanks for LFS, a Linux distribution that the first goal is education( http://www.linuxfromscratch.org/lfs/view/6.6/prologue/audience.html In the end, education is by far the most powerful of reasons. ).

Thank you.

-- 
littlebat <dashing.meng at gmail.com>



More information about the lfs-support mailing list