[lfs-dev] [PATCH] Revise command to use temporary shell in "Stripping Again"

Xi Ruoyao ryxi at stu.xidian.edu.cn
Fri Apr 27 19:33:49 PDT 2018

On 2018-04-27 11:32 -0500, Bruce Dubbs wrote:
> On 04/27/2018 07:16 AM, Xi Ruoyao wrote:
> > We have "exec /bin/bash" in Bash instruction, so it's no matter
> > about the chroot command used.  We can explicitly check which shell
> > is currently used.
> > 
> > And, use a simple "exec /tools/bin/bash" instead of reentering
> > the chroot.
> An interesting thought.  As I review the 'Stripping Again' and 'Cleaning 
> Up' pages I see we do not explicitly log out *after* stripping, so an 
> exec of /bin/bash would be needed afterward,
> One of the things the logout/chroot does is reset the PATH.  Of course 
> that can also be done at the command line.
> Perhaps a simpler way to approach it would be to skip the case statement 
> in the patch and just do:
> exec /tools/bin/bash --login
> PATH=/bin:/usr/bin:/sbin:/usr/sbin
> [striping]
> exec /bin/bash --login

Agree.  I forgot to change the PATH.
Xi Ruoyao <ryxi at stu.xidian.edu.cn>
School of Aerospace Science and Technology, Xidian University

More information about the lfs-dev mailing list