From a65b85fa890df5a24787ebbda6f2af1afd7faca5 Mon Sep 17 00:00:00 2001 From: Gerard Beekmans Date: Tue, 22 May 2001 23:31:21 +0000 Subject: [PATCH] Added chrootcmd.xml and have bash-inst.xml, glibc-inst.xml, m4-inst.xml and chroot.xml use that file git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@650 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter06/bash-inst.xml | 10 +--------- chapter06/chroot.xml | 7 +------ chapter06/chrootcmd.xml | 6 ++++++ chapter06/glibc-inst.xml | 8 +------- chapter06/m4-inst.xml | 5 +---- 5 files changed, 10 insertions(+), 26 deletions(-) create mode 100644 chapter06/chrootcmd.xml 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;