summaryrefslogtreecommitdiffstats
path: root/bootstrap-stage2-install.sh
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-07-04 14:29:26 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-07-04 14:29:26 (EDT)
commit3b6a163b9653468d0ffebfb2eeecf1fc3282e1bb (patch)
tree9888ab1dc470136152a1d56310919e907b9d952a /bootstrap-stage2-install.sh
parent375552f064d0c4e4bd759daecf98f5034755e8ba (diff)
bootstrap-stage2-install.sh: Unmount old mounts.
Diffstat (limited to 'bootstrap-stage2-install.sh')
-rwxr-xr-xbootstrap-stage2-install.sh21
1 files changed, 20 insertions, 1 deletions
diff --git a/bootstrap-stage2-install.sh b/bootstrap-stage2-install.sh
index 2f656d0..f50f42c 100755
--- a/bootstrap-stage2-install.sh
+++ b/bootstrap-stage2-install.sh
@@ -35,6 +35,7 @@ main()
=================================
EOF
+ clean_root
install_packages
install_archplat_sysconf
configure_packages
@@ -55,11 +56,29 @@ log()
printf '\n\n'
}
+clean_root()
+{
+ [ -d root2 ] || return
+
+ cd root2
+
+ case "${ARCH}" in
+ *-linux-*)
+ sudo umount proc || true
+ sudo umount sys || true
+ sudo umount dev || true
+ ;;
+ esac
+
+ cd ..
+
+ rm -Rf root2
+}
+
install_packages()
{
local opk pkg
- rm -Rf root2
mkdir root2
cd root2