gabriel batir wrote:
> Hello everybody!
> 
> I have found a few issues with the configuration chapters in LFS and BLFS.
> 
> 1. In chapter  7.9. The Bash Shell Startup Files from the LFS book we create 
> the /etc/profile file but in the BLFS book we create the same file with
> different content.
> 
> Not a big problem because it's clear that the file from BLFS contains a more 
> advanced configuration but shouldn't it be noted in the LFS book that this 
> file will be changed later in the BLFS book?

Not really.  The LFS scripts are spartan, but functional.  The idea
behind the BLFS scripts is to give you some suggestions to use.

> 2. In the chapter  The Bash Shell Startup Files from the BLFS book:
> 
> /etc/profile contains 
> #export PS1="[EMAIL PROTECTED] \w]\\$ "
> export PS1='[EMAIL PROTECTED]:\w\$ '
> 
> /etc/profile.d/extra-prompt.sh contains
> PROMPT_COMMAND='echo -ne "[EMAIL PROTECTED] : ${PWD}\e[0m\a"'
> export PROMPT_COMMAND
> 
> /etc/bashrc contains
> #export PS1="[EMAIL PROTECTED] \w]\\$ "
> export PS1='[EMAIL PROTECTED]:\w\$ '
> 
> If I leave these lines as they are I have the next problem.
> When I enter chroot the prompt is:   @lfs-test : /[EMAIL PROTECTED]:/# 
> If I reboot and login the prompt becomes: [EMAIL PROTECTED] : /[EMAIL 
> PROTECTED]:/#
> with the first [EMAIL PROTECTED] : in bright white or bold.
> 
> Maybe because of my poor English I missed something from the explanations on 
> this 
> page but this does not seem right.
> 
> I choose to comment all these lines except the one from /etc/profile and now 
> I 
> get [EMAIL PROTECTED]:/# as my prompt.

Exactly. They are meant for you to select and choose.  For instance is
says explicitly in the introductory paragraph to extra-prompt.sh

"This script shows an example of a different way of setting the prompt."

It is meant as an example.  Most people don't use it.  There has been
some discussion about removing or modifying this section.

> 3. When I login on a console or use the su - command I don't have the 
> history of previous of the previous entered commands when I press the up or 
> down arrow.

Right.  Leaving root's history file around is a security issue.   That
behavior is controlled by:

if [ $EUID -eq 0 ] ; then
        pathappend /sbin:/usr/sbin
        unset HISTFILE
fi

If you don't like it, just remove the unset command.

  -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to