From 95f0cf7fd61751bad85f9ef47bd17945f34c5eba Mon Sep 17 00:00:00 2001 From: William Harrington Date: Mon, 5 Apr 2021 20:26:18 -0500 Subject: Make commands verbose and output command block to essential.log. --- preparechroot.sh | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'preparechroot.sh') diff --git a/preparechroot.sh b/preparechroot.sh index c5351a6..52e1f60 100644 --- a/preparechroot.sh +++ b/preparechroot.sh @@ -16,27 +16,33 @@ fi if [[ "${USER}" == "root" ]]; then printf "%b" "${GRN}Changing ownership to root...${RST}\n" - chown -R root:root "${LFS}"/bin - chown -R root:root "${LFS}"/etc - chown -R root:root "${LFS}"/lib - chown -R root:root "${LFS}"/sbin - chown -R root:root "${LFS}"/tools - chown -R root:root "${LFS}"/usr - chown -R root:root "${LFS}"/var + { + chown -Rv root:root "${LFS}"/bin + chown -Rv root:root "${LFS}"/etc + chown -Rv root:root "${LFS}"/lib + chown -Rv root:root "${LFS}"/sbin + chown -Rv root:root "${LFS}"/tools + chown -Rv root:root "${LFS}"/usr + chown -Rv root:root "${LFS}"/var case $(uname -m) in - x86_64) chown -R root:root "${LFS}"/lib64 ;; + x86_64) chown -Rv root:root "${LFS}"/lib64 ;; esac +} >"${LFS}"/sources/log/preparechroot.log 2>&1 printf "%b" "${GRN}Creating virtual kernel filesystem mountpoints...${RST}\n" - mkdir -p "${LFS}"/dev - mkdir -p "${LFS}"/proc - mkdir -p "${LFS}"/run - mkdir -p "${LFS}"/sys - + { + mkdir -pv "${LFS}"/dev + mkdir -pv "${LFS}"/proc + mkdir -pv "${LFS}"/run + mkdir -pv "${LFS}"/sys +} >>"${LFS}"/sources/log/preparechroot.log 2>&1 + printf "%b" "${GRN}Creating initial device nodes...${RST}\n" - mknod -m 600 "${LFS}"/dev/console c 5 1 >/dev/null 2>&1 - mknod -m 666 "${LFS}"/dev/null c 1 3 >/dev/null 2>&1 + { + mknod -m 600 "${LFS}"/dev/console c 5 1 + mknod -m 666 "${LFS}"/dev/null c 1 3 +} >>"${LFS}"/sources/log/preparechroot.log 2>&1 source mountvirtfs.sh -- cgit v1.2.3-54-g00ecf