]> gitweb.fluxo.info Git - hydra.git/commitdiff
Setup mountpoint before creating the filesystem
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 8 Aug 2011 22:46:35 +0000 (19:46 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 8 Aug 2011 22:46:35 +0000 (19:46 -0300)
share/hydractl/provision

index 455fe882ff43fc2725abee7d5c64a8d4404a3b79..ca2092ee693f37dcbc9a5e756d3d6ea24d70ae5d 100755 (executable)
@@ -73,6 +73,11 @@ if [ "$garbage" == "y" ]; then
   dd if=/dev/urandom of="$device"1
 fi
 
+# Setup mountpoint and make sure it's not mounted due to a failed install.
+mkdir -p /tmp/debootstrap
+umount /tmp/debootstrap/proc &> /dev/null
+umount /tmp/debootstrap/dev  &> /dev/null
+
 # Create root device.
 if [ "$encrypt" == "y" ]; then
   echo "Creating encrypted root device..."
@@ -86,11 +91,6 @@ else
   install_device="/dev/vg/root"
 fi
 
-# Setup mountpoint and make sure it's not mounted due to a failed install.
-mkdir -p /tmp/debootstrap
-umount /tmp/debootstrap/proc &> /dev/null
-umount /tmp/debootstrap/dev  &> /dev/null
-
 # Initial system install.
 echo "Installing base system..."
 mount $install_device /tmp/debootstrap/