aboutsummaryrefslogtreecommitdiffstats
path: root/preparechroot.sh
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2021-04-05 20:26:18 -0500
committerWilliam Harrington <kb0iic@berzerkula.org>2021-04-05 20:26:18 -0500
commit95f0cf7fd61751bad85f9ef47bd17945f34c5eba (patch)
tree2d5cf0f77a60c58fc7d937f92079984c7ab4e001 /preparechroot.sh
parent3c9e5e5d686df5ad6090732897a44a40fda8d946 (diff)
Make commands verbose and output command block to essential.log.
Diffstat (limited to 'preparechroot.sh')
-rw-r--r--preparechroot.sh36
1 files changed, 21 insertions, 15 deletions
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