On 29/10/2015 12:11 πμ, Michael Havens wrote:
The $LFS is set. I'm trying to set another variable....
sources=$LFS/sources. it refuses to stay set.
lfs@debian:~$ cat ~/.bash_profile
exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
export LFS=/mnt/lfs
export sources=$LFS/sources
lfs@debian:~$ exit
exit
root@debian:~# su - lfs
lfs@debian:~$ cat ~/.bash_profile
exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
export LFS=/mnt/lfs
export sources=$LFS/sources
lfs@debian:~$ cd $sources
lfs@debian:~$ pwd
/home/lfs
lfs@debian:~$ nano ~/.bash_profile
lfs@debian:~$ cat ~/.bash_profile
exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
export LFS=/mnt/lfs
export sources=/mnt/lfs/sources
lfs@debian:~$ cd $sources
lfs@debian:~$ exit
exit
root@debian:~# su - lfs
lfs@debian:~$ cd $sources
lfs@debian:~$ cd $LFS/sources
lfs@debian:/mnt/lfs/sources$
Chapter 4.4. Setting Up the Environment:
The exec env -i.../bin/bash command in the .bash_profile file
replaces the running shell with a new one with a completely empty
environment, except for the HOME, TERM, and PS1 variables.
...
The new instance of the shell is a non-login shell, which does not read
the /etc/profile or .bash_profile files, but rather reads the .bashrc
file instead. Create the .bashrc file now:
Then it says to set the lfs user's environment variables in .bashrc
As I understand it, the lines in .bash_profile after the
exec env -i.../bin/bash command do nothing. Put them in .bashrc
as the book says.
--
Thanos
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
Do not top post on this list.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
http://en.wikipedia.org/wiki/Posting_style