diff options
-rw-r--r-- | preparechroot.sh | 36 |
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 |