aboutsummaryrefslogtreecommitdiffstats
path: root/lfs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lfs.sh')
-rwxr-xr-xlfs.sh23
1 files changed, 14 insertions, 9 deletions
diff --git a/lfs.sh b/lfs.sh
index cf96dca..c61f7ee 100755
--- a/lfs.sh
+++ b/lfs.sh
@@ -70,14 +70,17 @@ to user ${IWHT}${USER}${RST}\n"
fi
# Create limited directory layout
-mkdir -p "${LFS}"/sources
-mkdir -p "${LFS}"/tools
-mkdir -p "${LFS}"/bin
-mkdir -p "${LFS}"/etc
-mkdir -p "${LFS}"/lib
-mkdir -p "${LFS}"/sbin
-mkdir -p "${LFS}"/usr
-mkdir -p "${LFS}"/var
+if [[ ! -f "${LFS}"/sources/limited ]]; then
++ mkdir -p "${LFS}"/sources
++ mkdir -p "${LFS}"/tools
++ mkdir -p "${LFS}"/bin
++ mkdir -p "${LFS}"/etc
++ mkdir -p "${LFS}"/lib
++ mkdir -p "${LFS}"/sbin
++ mkdir -p "${LFS}"/usr
++ mkdir -p "${LFS}"/var
++ touch "${LFS}"/sources/limited
++fi
case $(uname -m) in
x86_64) mkdir -p "${LFS}"/lib64 ;;
@@ -142,7 +145,7 @@ chmod ugo+x preparechroot.sh
chmod ugo+x insidechroot.sh
printf "%b" "\n${CYN}PREPARING ${RED}CHROOT${CYN} ENVIRONMENT${RST}...\n"
-sudo ./preparechroot.sh "${LFS}"
+source preparechroot.sh "${LFS}"
source createdirs.sh
source essential.sh
@@ -151,6 +154,8 @@ sleep 3
# Create chapter7 log directory as non root user
mkdir -p "${LFS}"/sources/log/chapter7
+
+# Enter CHROOT for chapter 7
sudo chroot "${LFS}" /usr/bin/env -i \
HOME=/root \
TERM="${TERM}" \