aboutsummaryrefslogtreecommitdiffstats
path: root/lfs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lfs.sh')
-rwxr-xr-xlfs.sh13
1 files changed, 4 insertions, 9 deletions
diff --git a/lfs.sh b/lfs.sh
index 55bdfb6..0d2a894 100755
--- a/lfs.sh
+++ b/lfs.sh
@@ -143,6 +143,8 @@ chmod ugo+x insidechroot.sh
printf "%b" "\n${CYN}PREPARING ${RED}CHROOT${CYN} ENVIRONMENT${RST}...\n"
sudo ./preparechroot.sh "${LFS}"
+source createdirs.sh
+source essential.sh
printf "%b" "\n${CYN}ENTERING ${RED}CHROOT${CYN} ENVIRONMENT${RST}...\n"
sleep 3
@@ -155,19 +157,13 @@ sudo chroot "${LFS}" /usr/bin/env \
NUMPROCS="${NUMPROCS}" \
MAKEFLAGS="${MAKEFLAGS}" \
SPINNER="${SPINNER}" \
- TESTERUID="$(id -u)" \
/bin/bash --login +h -c "/sources/insidechroot.sh 7"
retval=$?
printf "%b" "\n${CYN}EXITED ${RED}CHROOT${RST} ENVIRONMENT...${RST}\n"
# Cleanup and Backup if chapter 7 successfully finished
-if [[ "$retval" -eq 7 ]]; then
- printf "%b" "${GRN}Unmounting Virtual Kernel Filesystems...\n"
- sudo umount "${LFS}"/dev/pts
- sudo umount "${LFS}"/dev/
- sudo umount "${LFS}"/run
- sudo umount "${LFS}"/sys
- sudo umount "${LFS}"/proc
+if [[ "$retval" -eq 0 ]]; then
+ source umountvirtfs.sh
printf "%b" "\n${IWHT}======= ${IYLW}Chapter 7 ${IGRN}Cleanup and Backup \
${IWHT}=======${RST}\n"
@@ -192,7 +188,6 @@ sudo chroot "${LFS}" /usr/bin/env \
NUMPROCS="${NUMPROCS}" \
MAKEFLAGS="${MAKEFLAGS}" \
SPINNER="${SPINNER}" \
- TESTERUID="$(id -u)" \
/bin/bash --login +h -c "/sources/insidechroot.sh 8"
printf "%b" "\n${CYN}EXITED ${RED}CHROOT${CYN} ENVIRONMENT${RST}...\n"