diff options
author | P. J. McDermott <pjm@nac.net> | 2013-07-04 14:31:39 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2013-07-04 14:31:39 (EDT) |
commit | c6fd49809b9bc0a4aeea44ebf18ed6c0f9983b1c (patch) | |
tree | 81234b2565e351bc011e5b4ecd3272eb67527e82 | |
parent | 3b6a163b9653468d0ffebfb2eeecf1fc3282e1bb (diff) |
bootstrap-stage1-install.sh: Unmount old mounts.
-rwxr-xr-x | bootstrap-stage1-install.sh | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/bootstrap-stage1-install.sh b/bootstrap-stage1-install.sh index 0772fc7..2bf354c 100755 --- a/bootstrap-stage1-install.sh +++ b/bootstrap-stage1-install.sh @@ -35,6 +35,7 @@ main() ================================= EOF + clean_root install_packages install_elf_interp_link install_archplat_sysconf @@ -56,11 +57,29 @@ log() printf '\n\n' } +clean_root() +{ + [ -d root1 ] || return + + cd root1 + + case "${ARCH}" in + *-linux-*) + sudo umount proc || true + sudo umount sys || true + sudo umount dev || true + ;; + esac + + cd .. + + rm -Rf root1 +} + install_packages() { local opk pkg - rm -Rf root1 mkdir root1 cd root1 |