]> gitweb.fluxo.info Git - hydra.git/commitdiff
Using $swap_device at provision
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 8 May 2011 14:31:50 +0000 (11:31 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 8 May 2011 14:31:50 +0000 (11:31 -0300)
share/hydractl/provision

index e3f00f6d651c7dc8768c53cfeefc2a8767e18b8e..72b99e4adbb8e2a133b0e5eb257c71d6a361d819 100755 (executable)
@@ -9,6 +9,7 @@ hydra_config_load
 
 # Setup.
 hydra_user_input device /dev/sdb "Destination device"
+hydra_user_input swap_device /dev/sda1 "Final swap device"
 hydra_user_input garbage y "Pre-fill volumes with garbage? (y/n)"
 hydra_user_input hostname $HOSTNAME "Hostname"
 hydra_user_input domain example.com "Domain"
@@ -87,12 +88,11 @@ chroot /tmp/debootstrap/ apt-get upgrade -y
 chroot /tmp/debootstrap/ apt-get install locales cryptsetup lvm2 initramfs-tools -y
 
 # Crypttab.
-swap="$device"1
 echo "Configuring crypttab..."
 cat > /tmp/debootstrap/etc/crypttab <<-EOF
 # <target name> <source device>   <key file>  <options>
 root            /dev/mapper/vg-root     none            luks,cipher=aes-cbc-essiv:sha256
-cswap           $swap               /dev/random     swap,cipher=aes-cbc-essiv:sha256
+cswap           $swap_device               /dev/random     swap,cipher=aes-cbc-essiv:sha256
 EOF
 
 # Fstab.