bash_profile

Scott Swanson DrMemory at starband.net
Thu Sep 16 09:23:10 PDT 2004


On Thu, 16 Sep 2004, Matthias B. wrote:

> On Wed, 15 Sep 2004 15:56:49 -0600 (MDT) Scott Swanson
> <DrMemory at starband.net> wrote:
> 
> > On Wed, 15 Sep 2004, Scott Swanson wrote:
> > > 
> > > + echo .bashrc
> > > .bashrc
> > > + exec env -i HOME=/home/lfs TERM=linux PS1='\u:\w\$ ' /bin/bash
> > 
> > correction:
> > 
> >   + exec env -i HOME=/home/lfs TERM=linux 'PS1=\u:\w\$ ' /bin/bash
> 
> Is there a special reason why you placed the quotes different from the
> command in the book? I don't think that could be responsible for your
> problem, but you never know.

Actually, the quotes are "bookish" in the profile file. After expansion,
they show up as indicated, because of the space at the end.

> 
> Anyways, I still have no idea what's happening, but I've not run out of
> ideas, yet :-)
> 
> 1. What happens when you remove the "exec" from the above command, i.e. if
> you use
> 
> env -i HOME=/home/lfs TERM=linux PS1='\u:\w\$ ' /bin/bash
> 
> Does the shell still hang? Post the relevant part of ps axlfwww. 

Shell does *not* hang!

  F   UID   PID  PPID PRI  NI   VSZ  RSS WCHAN  STAT TTY        TIME COMMAND
100   516  1191   756   1   0  2088 1132 wait4  S    tty6       0:00  \_ -bash
000   516  1201  1191   1   0  1940 1116 schedu S    tty6       0:00      \_ /bin/bash

And the .bashrc does get executed.

> 
> 2. What happens when you replace the whole command with
> 
> HOME=/home/lfs TERM=linux PS1='\u:\w\$ ' /bin/bash

Also does not hang

100   516  1253  1252   5   0  2088 1132 wait4  S    tty6       0:00  \_ -bash
000   516  1263  1253   6   0  2124 1200 schedu S    tty6       0:00      \_ /bin/bash

> 
> 3. What happens when you use
> 
> HOME=/home/lfs TERM=linux PS1='\u:\w\$ ' exec /bin/bash
> 

Hangs after the exec...

100     0  1269     1   0   0  2192 1140 wait4  S    tty6       0:00 login -- lfs    
100   516  1270  1269  13   0  2024  900 -      R    tty6       0:37  \_ /bin/bash

> 4. Go to /tmp, extract the bash-tarball, cd into the bash-<version>
> directory and build bash (as normal user):
> 
> ./configure && make

Well, configure has been running for ten minutes now. I'll get back to you
in a day or two. Told you this was a slow machine. Don't think it will be
worth the effort, but maybe your diagnostic efforts will be of use to
someone else starting from an old bash.

Make is going now. Forgot to wrap the whole thing in a time{}, so I'll use
the old wristwatch.

Let me know if the previous diagnostics gave you enough to go on. Thanks
for all your time and trouble!

Scott.







More information about the lfs-support mailing list