From 085448d19cf6c2d5df7b8c68ecae3ecfb9583d20 Mon Sep 17 00:00:00 2001 From: YellowJacketLinux Date: Sat, 5 Oct 2024 19:03:27 -0700 Subject: [PATCH] bug fix --- CH04.01-systemprep.sh | 17 ++++++----------- CH5Build/CH05-Master.sh | 27 +++++++++++++++++++++++---- CH5Build/CH05-Master2.sh | 23 ----------------------- 3 files changed, 29 insertions(+), 38 deletions(-) delete mode 100644 CH5Build/CH05-Master2.sh diff --git a/CH04.01-systemprep.sh b/CH04.01-systemprep.sh index 26746c7..5f5b735 100644 --- a/CH04.01-systemprep.sh +++ b/CH04.01-systemprep.sh @@ -1,7 +1,6 @@ #!/bin/bash LFS=/mnt/newlfs -#LFS=/home/mpeters/newlfs function myfail { echo "$1" @@ -13,25 +12,21 @@ if [ "`whoami`" != "root" ]; then myfail "Must run this script as r00t" fi -mkdir -pv ${LFS}/{etc,var} ${LFS}/usr/{bin,lib,sbin} +mkdir -p ${LFS}/{etc,var} ${LFS}/usr/{bin,lib,sbin} for i in bin lib sbin; do - ln -sv usr/$i ${LFS}/$i + ln -s usr/$i ${LFS}/$i done -case $(uname -m) in - x86_64) mkdir -pv ${LFS}/lib64 ;; -esac +mkdir -p ${LFS}/lib64 -mkdir -pv ${LFS}/tools +mkdir -p ${LFS}/tools groupadd lfs useradd -s /bin/bash -g lfs -m -k /dev/null lfs -chown -v lfs ${LFS}/{usr{,/*},lib,var,etc,bin,sbin,tools} -case $(uname -m) in - x86_64) chown -v ${LFS}/lib64 ;; -esac +chown lfs ${LFS}/{usr{,/*},lib,var,etc,bin,sbin,tools} +chown lfs ${LFS}/lib64 echo "Please set a password for the lfs user account" echo "" diff --git a/CH5Build/CH05-Master.sh b/CH5Build/CH05-Master.sh index 0912659..8d31ea2 100644 --- a/CH5Build/CH05-Master.sh +++ b/CH5Build/CH05-Master.sh @@ -33,8 +33,27 @@ else sleep 3 fi -echo "Before executing Master2," -echo "As root, issue following two commands:" +ln -sfv ../lib/ld-linux-x86-64.so.2 ${LFS}/lib64 +ln -sfv ../lib/ld-linux-x86-64.so.2 ${LFS}/lib64/ld-lsb-x86-64.so.3 + +/bin/bash CH05.04-glibc.sh + +if [ $? -ne 0 ]; then + echo "failed CH05.03-linux-api-headers.sh" + exit 1 +else + echo "LFS Chapter 5 Glibc 2.40 complete" + sleep 3 +fi + +/bin/bash CH05.05-libstdc++.sh + +if [ $? -ne 0 ]; then + echo "failed CH05.05-libstdc++.sh" + exit 1 +else + echo "LFS Chapter 5 Libstdc++ from GCC 14.2.0 complete" + sleep 3 +fi + -echo "ln -sfv ../lib/ld-linux-x86-64.so.2 ${LFS}/lib64" -echo "ln -sfv ../lib/ld-linux-x86-64.so.2 ${LFS}/lib64/ld-lsb-x86-64.so.3" diff --git a/CH5Build/CH05-Master2.sh b/CH5Build/CH05-Master2.sh deleted file mode 100644 index d6c5351..0000000 --- a/CH5Build/CH05-Master2.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -/bin/bash CH05.04-glibc.sh - -if [ $? -ne 0 ]; then - echo "failed CH05.03-linux-api-headers.sh" - exit 1 -else - echo "LFS Chapter 5 Glibc 2.40 complete" - sleep 3 -fi - -/bin/bash CH05.05-libstdc++.sh - -if [ $? -ne 0 ]; then - echo "failed CH05.05-libstdc++.sh" - exit 1 -else - echo "LFS Chapter 5 Libstdc++ from GCC 14.2.0 complete" - sleep 3 -fi - -