summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rwxr-xr-xshare/hydractl/provision3
1 files changed, 2 insertions, 1 deletions
diff --git a/share/hydractl/provision b/share/hydractl/provision
index e31b195..e3f00f6 100755
--- a/share/hydractl/provision
+++ b/share/hydractl/provision
@@ -87,11 +87,12 @@ 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 "$device"1 /dev/random swap,cipher=aes-cbc-essiv:sha256
+cswap $swap /dev/random swap,cipher=aes-cbc-essiv:sha256
EOF
# Fstab.