From c6fd49809b9bc0a4aeea44ebf18ed6c0f9983b1c Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 04 Jul 2013 14:31:39 -0400 Subject: bootstrap-stage1-install.sh: Unmount old mounts. --- (limited to 'bootstrap-stage1-install.sh') 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 -- cgit v0.9.1