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
I am interested in other opinions.
-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page