aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2021-04-02 13:31:48 -0500
committerWilliam Harrington <kb0iic@berzerkula.org>2021-04-02 13:31:48 -0500
commit89b1f1e2805a93e4c334dd4c8551d82075489e2b (patch)
tree9f5f816f8c68d63750ee8dcfe4177fc37ec062ef
parentbc2ffe5e6633538e5e34e1867b3a16c844c8b5fe (diff)
Cleanup information messages.
-rw-r--r--chapter6/backup.sh2
-rw-r--r--chapter6/cleanup.sh2
-rw-r--r--insidechroot.sh10
-rwxr-xr-xlfs.sh13
-rw-r--r--packageinstall.sh4
-rw-r--r--preparechroot.sh2
6 files changed, 17 insertions, 16 deletions
diff --git a/chapter6/backup.sh b/chapter6/backup.sh
index 615aaf7..73e3b3d 100644
--- a/chapter6/backup.sh
+++ b/chapter6/backup.sh
@@ -4,7 +4,7 @@ file="${LFS_VER}-ch6-backup.tar.xz"
directories=(bin etc lib lib64 sbin tools usr var)
if [ -f "${LFS}/sources/chapter6/backup" ]; then
- printf "%b" " ${IGRN}Backup found. Remove manually to backup again.${RST}\n"
+ printf "%b" " ${IGRN}Backup previously completed${RST}\n"
else
echo -ne "${GRN}Backing up ${YLW}${LFS}${GRN} to ${YLW}${file}${RST}... "
diff --git a/chapter6/cleanup.sh b/chapter6/cleanup.sh
index 9bd8fee..29b133f 100644
--- a/chapter6/cleanup.sh
+++ b/chapter6/cleanup.sh
@@ -1,7 +1,7 @@
#!/bin/bash
if [ -f "${LFS}/sources/chapter6/cleanup" ]; then
- echo -e " ${IGRN}Cleanup already performed.${RST}"
+ echo -e " ${IGRN}Cleanup already performed${RST}"
else
echo -ne "${GRN}Cleaning up ${YLW}${LFS}${RST}... "
diff --git a/insidechroot.sh b/insidechroot.sh
index 1bb0732..b4a743a 100644
--- a/insidechroot.sh
+++ b/insidechroot.sh
@@ -8,9 +8,9 @@ source /sources/functions.sh
printf "%b" "${CYN}SUCCESSFULLY ENTERED ${RED}CHROOT${RST}!\n"
if [[ "${CHAPTER}" -eq 7 ]]; then
- printf "%b" "${GRN}Creating directories...${RST}\n"
+ printf "%b" "${GRN}Creating directories${RST}... "
if [[ -f /sources/createdirs ]]; then
- printf "%b" "${IGRN} Directories already created.${RST}\n"
+ printf "%b" "\n ${IGRN}Directories already created${RST}\n"
else
mkdir -p /boot
mkdir -p /home
@@ -87,9 +87,9 @@ if [[ "${CHAPTER}" -eq 7 ]]; then
touch /sources/createdirs
fi
- printf "%b" "${GRN}Creating essential files and symbolic links... ${RST}\n"
+ printf "%b" "${GRN}Creating essential files and symbolic links${RST}... "
if [[ -f "/sources/essential" ]]; then
- printf "%b" " ${IGRN}Essential files and symbolic links already created.${RST}\n"
+ printf "%b" "\n ${IGRN}Essential files and symbolic links already created${RST}\n"
else
ln -sf /proc/self/mounts /etc/mtab
echo "127.0.0.1 localhost $(hostname)" > /etc/hosts
@@ -143,8 +143,8 @@ EOF
chmod 664 /var/log/lastlog
chmod 600 /var/log/btmp
- echo -e " ${GRN}Essential files and symlinks created.${RST}"
touch /sources/essential
+ printf "%b" "${IGRN}OK${RST}\n"
fi
cd /sources || exit 1
diff --git a/lfs.sh b/lfs.sh
index 5a273c1..0203a45 100755
--- a/lfs.sh
+++ b/lfs.sh
@@ -45,7 +45,7 @@ else
fi
# Create LFS directory if it doesn't exist
-printf "%b" "${GRN}Creating LFS directory at ${YLW}${LFS}${GRN}... ${RST}"
+printf "%b" "${GRN}Creating LFS directory at ${YLW}${LFS}${GRN}${RST}... "
if [[ -d "${LFS}" ]]; then
printf "%b" "${IGRN}EXISTS${RST}\n"
else
@@ -91,7 +91,7 @@ esac
# Copy scripts and csv files to LFS sources target
printf "%b" "${GRN}Copying required files to ${YLW}${LFS}/sources \
-${GRN}target directory... ${RST}"
+${GRN}target directory${RST}... "
if ! cp -rf ./*.sh chapter* ./*.csv "${LFS}/sources"; then
printf "%b" "${IRED}FAILED!${RST}\n"
@@ -132,7 +132,8 @@ for package in m4 ncurses bash coreutils diffutils file findutils gawk grep gzip
fi
done
-printf "%b" "\n${YLW}Chapter 6 ${GRN}cleanup and backup${RST}\n"
+printf "%b" "\n${IWHT}======= ${IYLW}Chapter 6 ${IGRN}Cleanup and Backup \
+${IWHT}=======${RST}\n"
source chapter6/cleanup.sh
source chapter6/backup.sh
@@ -140,10 +141,10 @@ source chapter6/backup.sh
chmod ugo+x preparechroot.sh
chmod ugo+x insidechroot.sh
-printf "%b" "\n${CYN}PREPARING ${RED}CHROOT${CYN} ENVIRONMENT...${RST}\n"
+printf "%b" "\n${CYN}PREPARING ${RED}CHROOT${CYN} ENVIRONMENT${RST}...\n"
sudo ./preparechroot.sh "${LFS}"
-printf "%b" "\n${CYN}ENTERING ${RED}CHROOT${CYN} ENVIRONMENT...${RST}\n"
+printf "%b" "\n${CYN}ENTERING ${RED}CHROOT${CYN} ENVIRONMENT${RST}...\n"
sleep 3
sudo chroot "${LFS}" /usr/bin/env \
@@ -156,4 +157,4 @@ sudo chroot "${LFS}" /usr/bin/env \
TESTERUID="$(id -u)" \
/bin/bash --login +h -c "/sources/insidechroot.sh 7"
-printf "%b" "\n${CYN}EXITED ${RED}CHROOT${CYN} ENVIRONMENT...${RST}\n"
+printf "%b" "\n${CYN}EXITED ${RED}CHROOT${CYN} ENVIRONMENT${RST}...\n"
diff --git a/packageinstall.sh b/packageinstall.sh
index 1374b21..a277e6c 100644
--- a/packageinstall.sh
+++ b/packageinstall.sh
@@ -4,7 +4,7 @@ CHAPTER="$1"
PACKAGE="$2"
if [[ -f "${LFS}/sources/chapter${CHAPTER}/${PACKAGE}" ]]; then
- printf "%b" "${GRN}Package ${YLW}${PACKAGE} ${GRN}already built and installed for ${YLW}Chapter ${CHAPTER}.${RST}\n"
+ printf "%b" "${GRN}Package ${YLW}${PACKAGE} ${GRN}already built and installed${RST}\n"
else
grep -i "^${PACKAGE}" packages.csv | grep -i -v "\.patch;" | while read -r line; do
@@ -16,7 +16,7 @@ else
# Remove existing if exists
rm -rf "${DIRNAME}"
- printf "%b" "${IBLU}Extracting ${YLW}${CACHEFILE}... ${RST}"
+ printf "%b" "${IBLU}Extracting ${YLW}${CACHEFILE}${RST}... "
tar xf "${CACHEFILE}" > /dev/null 2>&1 & pid=$!
spinner "$pid" "${SPINNER}"
retval=$?
diff --git a/preparechroot.sh b/preparechroot.sh
index 82cd147..c5351a6 100644
--- a/preparechroot.sh
+++ b/preparechroot.sh
@@ -5,7 +5,7 @@ source colors.sh
export LFS="$1"
if [[ -f chrootprepared ]]; then
- printf "%b" " ${IRED}CHROOT ${IGRN}already prepared...\n${RST}"
+ printf "%b" " ${IRED}CHROOT ${IGRN}already prepared\n${RST}"
exit 0
fi