diff --git a/chapter06/bash-inst.xml b/chapter06/bash-inst.xml index bc5c142c6..b1872638f 100644 --- a/chapter06/bash-inst.xml +++ b/chapter06/bash-inst.xml @@ -18,15 +18,7 @@ The static bash is replaced with the dynamic bash and the chroot'ed environment is re-entered by running: -
- mv $LFS/usr/bin/bash $LFS/usr/bin/bashbug - $LFS/bin && - chroot $LFS /usr/bin/env -i HOME=/root - \ -    TERM=$TERM /bin/bash - --login - -
+&c6-chrootcmd; diff --git a/chapter06/chroot.xml b/chapter06/chroot.xml index 906d71b48..17745173c 100644 --- a/chapter06/chroot.xml +++ b/chapter06/chroot.xml @@ -13,12 +13,7 @@ everything a user does will be restricted to the LFS partition (since / is actually /mnt/lfs but the shell doesn't know that). -
- cd $LFS && - chroot $LFS /usr/bin/env -i HOME=/root - \ -    TERM=$TERM /bin/bash --login -
+&c6-chrootcmd; The TERM=$TERM construction will set the $TERM value inside diff --git a/chapter06/chrootcmd.xml b/chapter06/chrootcmd.xml new file mode 100644 index 000000000..9b3b7e881 --- /dev/null +++ b/chapter06/chrootcmd.xml @@ -0,0 +1,6 @@ +
+ cd $LFS && + chroot $LFS /usr/bin/env -i HOME=/root + \ +    TERM=$TERM /bin/bash --login +
diff --git a/chapter06/glibc-inst.xml b/chapter06/glibc-inst.xml index c4062bbde..ba7463e4a 100644 --- a/chapter06/glibc-inst.xml +++ b/chapter06/glibc-inst.xml @@ -69,13 +69,7 @@ to ensure a properly working bash. Run the following commands to accomplish this:
-
- logout - chroot $LFS /usr/bin/env -i HOME=/root - \ -    TERM=$TERM /bin/bash --login - -
+&c6-chrootcmd; diff --git a/chapter06/m4-inst.xml b/chapter06/m4-inst.xml index e43aeece3..76ae89340 100644 --- a/chapter06/m4-inst.xml +++ b/chapter06/m4-inst.xml @@ -44,10 +44,7 @@ this can be done after having rebooted into the LFS system rather than chrooting into it. -
- chroot $LFS /usr/bin/env -i HOME=/root \ -    TERM=$TERM /bin/bash --login -
+&c6-chrootcmd;