]> gitweb.fluxo.info Git - hydra.git/commitdiff
Setting install_device if not encrypted installation
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 8 Aug 2011 21:28:15 +0000 (18:28 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 8 Aug 2011 21:28:15 +0000 (18:28 -0300)
share/hydractl/provision

index de03fcfb10fcb879a7788b413fc73350cc80ba56..0d007d0a0fda20d6395ce0569538fb8130ddb07a 100755 (executable)
@@ -66,15 +66,17 @@ if [ "$encrypt" == "y" ]; then
   cryptsetup -h sha256 -c aes-cbc-essiv:sha256 -s 256 luksFormat /dev/$vg/root
   cryptsetup luksOpen /dev/$vg/root debootstrap
   mkfs.ext3 /dev/mapper/debootstrap
+  install_device="/dev/mapper/deboostrap"
 else
   echo "Creating root device..."
   mkfs.ext3 /dev/vg/root
+  install_device="/dev/vg/root"
 fi
 
 # Initial system install.
 echo "Installing base system..."
 mkdir -p /tmp/debootstrap
-mount /dev/mapper/debootstrap /tmp/debootstrap/
+mount $install_device /tmp/debootstrap/
 debootstrap --arch=$arch $version /tmp/debootstrap/
 
 # Initial configuration.