From ee4151300e1e2eba01aecfb8da50e3dcb581a8c4 Mon Sep 17 00:00:00 2001 From: William Harrington Date: Thu, 1 Apr 2021 15:19:54 -0500 Subject: Use intense colors for indented messages. --- insidechroot.sh | 4 ++-- preparechroot.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/insidechroot.sh b/insidechroot.sh index 91f75c9..6e01ccf 100644 --- a/insidechroot.sh +++ b/insidechroot.sh @@ -10,7 +10,7 @@ printf "%b" "${CYN}SUCCESSFULLY ENTERED ${RED}CHROOT${RST}!\n" if [ "${CHAPTER}" -eq 7 ]; then printf "%b" "${GRN}Creating directories...${RST}\n" if [ -f /sources/createdirs ]; then - printf "%b" "${GRN} Directories already created.${RST}\n" + printf "%b" "${IGRN} Directories already created.${RST}\n" else mkdir -p /boot mkdir -p /home @@ -89,7 +89,7 @@ if [ "${CHAPTER}" -eq 7 ]; then printf "%b" "${GRN}Creating essential files and symbolic links... ${RST}\n" if [ -f "/sources/essential" ]; then - printf "%b" " ${GRN}Essential files and symbolic links already created.${RST}\n" + printf "%b" " ${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 diff --git a/preparechroot.sh b/preparechroot.sh index 1d05e72..32f6558 100644 --- a/preparechroot.sh +++ b/preparechroot.sh @@ -5,7 +5,7 @@ source colors.sh export LFS="$1" if [ -f chrootprepared ]; then - printf "%b" "${RED}CHROOT ${GRN}already prepared...\n${RST}" + printf "%b" " ${IRED}CHROOT ${IGRN}already prepared...\n${RST}" exit 0 fi -- cgit v1.2.3-54-g00ecf From f1b8c43aca0cc1e560740d084edb90eb00a293a2 Mon Sep 17 00:00:00 2001 From: William Harrington Date: Thu, 1 Apr 2021 15:25:33 -0500 Subject: Add new line after backup already found message. --- chapter6/backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter6/backup.sh b/chapter6/backup.sh index f710037..db01b98 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" "${YLW}Chapter 6 ${GRN}Backup found. Remove manually to backup again.${RST}" + printf "%b" "${YLW}Chapter 6 ${GRN}Backup found. Remove manually to backup again.\n${RST}" else echo -ne "${GRN}Backing up ${YLW}${LFS}${GRN} to ${YLW}${file}${RST}... " -- cgit v1.2.3-54-g00ecf From 7b2527be03cd5405b30da7ec13852adcb49a6617 Mon Sep 17 00:00:00 2001 From: William Harrington Date: Thu, 1 Apr 2021 15:26:52 -0500 Subject: Add new lines in front of CHROOT messages. --- lfs.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lfs.sh b/lfs.sh index 6f15ca9..275e8f2 100755 --- a/lfs.sh +++ b/lfs.sh @@ -125,10 +125,10 @@ source chapter6/backup.sh chmod ugo+x preparechroot.sh chmod ugo+x insidechroot.sh -printf "%b" "${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" "${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 \ @@ -141,4 +141,4 @@ sudo chroot "${LFS}" /usr/bin/env \ TESTERUID="$(id -u)" \ /bin/bash --login +h -c "/sources/insidechroot.sh 7" -printf "%b" "${CYN}EXITED ${RED}CHROOT${CYN} ENVIRONMENT...${RST}\n" +printf "%b" "\n${CYN}EXITED ${RED}CHROOT${CYN} ENVIRONMENT...${RST}\n" -- cgit v1.2.3-54-g00ecf From 53f0569209c46118d5efdb2591bd2104529e1323 Mon Sep 17 00:00:00 2001 From: William Harrington Date: Thu, 1 Apr 2021 15:41:48 -0500 Subject: Adjust indention. --- functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.sh b/functions.sh index da94f44..a5321b2 100644 --- a/functions.sh +++ b/functions.sh @@ -104,7 +104,7 @@ function spinner() { tput civis # cursor invisible tput bold setaf 7 while kill -0 "$pid" 2>/dev/null; do - local i=$(((i + charwidth) % ${#spin})) + local i=$(((i + charwidth) % ${#spin})) printf "%b" "${spin:$i:$charwidth}" cursorBack 1 -- cgit v1.2.3-54-g00ecf From f3989dd2c87a83fddb5525e06c5a0fe38309e8f9 Mon Sep 17 00:00:00 2001 From: William Harrington Date: Thu, 1 Apr 2021 15:43:38 -0500 Subject: Adjust indention. --- functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.sh b/functions.sh index a5321b2..63fa887 100644 --- a/functions.sh +++ b/functions.sh @@ -104,7 +104,7 @@ function spinner() { tput civis # cursor invisible tput bold setaf 7 while kill -0 "$pid" 2>/dev/null; do - local i=$(((i + charwidth) % ${#spin})) + local i=$(((i + charwidth) % ${#spin})) printf "%b" "${spin:$i:$charwidth}" cursorBack 1 -- cgit v1.2.3-54-g00ecf From 841657097abbeef2ab325f9d2989adc578ed1c53 Mon Sep 17 00:00:00 2001 From: William Harrington Date: Thu, 1 Apr 2021 16:20:54 -0500 Subject: Use intense colors for already completed message. --- chapter6/cleanup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter6/cleanup.sh b/chapter6/cleanup.sh index cd620d3..9a1e3af 100644 --- a/chapter6/cleanup.sh +++ b/chapter6/cleanup.sh @@ -1,7 +1,7 @@ #!/bin/bash if [ -f "${LFS}/sources/chapter6/cleanup" ]; then - echo -e "${YLW}Chapter 6 ${GRN}cleanup already performed.${RST}" + echo -e "${IYLW}Chapter 6 ${IGRN}cleanup already performed.${RST}" else echo -ne "${GRN}Cleaning up ${YLW}${LFS}${RST}... " -- cgit v1.2.3-54-g00ecf From 47a6efa222ff8e90c19f845c030b128a470f735e Mon Sep 17 00:00:00 2001 From: William Harrington Date: Thu, 1 Apr 2021 16:23:49 -0500 Subject: Fix indentation. --- chapter6/cleanup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter6/cleanup.sh b/chapter6/cleanup.sh index 9a1e3af..3215924 100644 --- a/chapter6/cleanup.sh +++ b/chapter6/cleanup.sh @@ -1,7 +1,7 @@ #!/bin/bash if [ -f "${LFS}/sources/chapter6/cleanup" ]; then - echo -e "${IYLW}Chapter 6 ${IGRN}cleanup already performed.${RST}" + echo -e " ${IYLW}Chapter 6 ${IGRN}cleanup already performed.${RST}" else echo -ne "${GRN}Cleaning up ${YLW}${LFS}${RST}... " -- cgit v1.2.3-54-g00ecf From 1a488adb59bfb12d64d8e6694b8bdb2bea7a2832 Mon Sep 17 00:00:00 2001 From: William Harrington Date: Thu, 1 Apr 2021 16:29:45 -0500 Subject: Use intense color and indention for backup already found message. --- chapter6/backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter6/backup.sh b/chapter6/backup.sh index db01b98..8d2be5d 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" "${YLW}Chapter 6 ${GRN}Backup found. Remove manually to backup again.\n${RST}" + printf "%b" " ${IYLW}Chapter 6 ${IGRN}Backup found. Remove manually to backup again.\n${RST}" else echo -ne "${GRN}Backing up ${YLW}${LFS}${GRN} to ${YLW}${file}${RST}... " -- cgit v1.2.3-54-g00ecf From 193cfb48599911ae3ce04414a36d639e4fbfcf77 Mon Sep 17 00:00:00 2001 From: William Harrington Date: Thu, 1 Apr 2021 16:32:34 -0500 Subject: Add message for cleanup and backup tasks. --- lfs.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lfs.sh b/lfs.sh index 275e8f2..ad7f2ea 100755 --- a/lfs.sh +++ b/lfs.sh @@ -118,6 +118,7 @@ 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" source chapter6/cleanup.sh source chapter6/backup.sh -- cgit v1.2.3-54-g00ecf From a0621e1c11352e833cc04f4e68b96319316d3872 Mon Sep 17 00:00:00 2001 From: William Harrington Date: Thu, 1 Apr 2021 16:53:26 -0500 Subject: Use intense colors for virtual filesystems already mounted. --- mountvirtfs.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/mountvirtfs.sh b/mountvirtfs.sh index 7eea548..2849dad 100644 --- a/mountvirtfs.sh +++ b/mountvirtfs.sh @@ -2,29 +2,29 @@ printf "%b" "${GRN}Mounting virtual kernel filesystems...${RST}\n" if ! mountpoint "${LFS}"/dev >/dev/null 2>&1; then - sudo mount -v --bind /dev "${LFS}"/dev + sudo mount --bind /dev "${LFS}"/dev else - printf "%b" " ${YLW}${LFS}/dev${GRN} is already mounted${RST}\n" + printf "%b" " ${IYLW}${LFS}/dev${IGRN} is already mounted${RST}\n" fi if ! mountpoint "${LFS}"/dev/pts >/dev/null 2>&1; then - sudo mount -v --bind /dev/pts "${LFS}"/dev/pts + sudo mount --bind /dev/pts "${LFS}"/dev/pts else - printf "%b" " ${YLW}${LFS}/dev/pts${GRN} is already mounted${RST}\n" + printf "%b" " ${IYLW}${LFS}/dev/pts${IGRN} is already mounted${RST}\n" fi if ! mountpoint "${LFS}"/proc >/dev/null 2>&1; then - sudo mount -v --bind /proc "${LFS}"/proc + sudo mount --bind /proc "${LFS}"/proc else - printf "%b" " ${YLW}${LFS}/proc${GRN} is already mounted${RST}\n" + printf "%b" " ${IYLW}${LFS}/proc${IGRN} is already mounted${RST}\n" fi if ! mountpoint "${LFS}"/sys >/dev/null 2>&1; then - sudo mount -v --bind /sys "${LFS}"/sys + sudo mount --bind /sys "${LFS}"/sys else - printf "%b" " ${YLW}${LFS}/sys${GRN} is already mounted${RST}\n" + printf "%b" " ${IYLW}${LFS}/sys${IGRN} is already mounted${RST}\n" fi if ! mountpoint "${LFS}"/run >/dev/null 2>&1; then - sudo mount -v --bind /run "${LFS}"/run + sudo mount --bind /run "${LFS}"/run else - printf "%b" " ${YLW}${LFS}/run${GRN} is already mounted${RST}\n" + printf "%b" " ${IYLW}${LFS}/run${IGRN} is already mounted${RST}\n" fi if [ -h "${LFS}"/dev/shm ]; then -- cgit v1.2.3-54-g00ecf