diff options
Diffstat (limited to 'share/hydractl/provision')
-rwxr-xr-x | share/hydractl/provision | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/share/hydractl/provision b/share/hydractl/provision index 628e82c..9bd8aac 100755 --- a/share/hydractl/provision +++ b/share/hydractl/provision @@ -169,7 +169,7 @@ hydra_safe_run vgchange -a y $vg hydra_provision_lvcreate root $root_size # Create swap partition -if [ "$swap" != "0" ]; then +if [ "$swap_size" != "0" ]; then hydra_provision_lvcreate swap $swap_size fi @@ -197,7 +197,7 @@ if [ "$garbage" == "y" ]; then dd if=/dev/urandom of=/dev/mapper/$vg-var fi - if [ "$swap" != "0" ]; then + if [ "$swap_size" != "0" ]; then dd if=/dev/urandom of=/dev/mapper/$vg-swap fi fi @@ -210,7 +210,7 @@ for folder in proc dev home var boot sys; do done # Create swap fs. -if [ "$swap" != "0" ] && [ "$random_swap" != "y" ]; then +if [ "$swap_size" != "0" ] && [ "$random_swap" != "y" ]; then hydra_cryptsetup /dev/mapper/$vg-swap hydra_safe_run cryptsetup luksOpen /dev/mapper/$vg-swap provision-swap hydra_safe_run mkswap /dev/mapper/provision-swap @@ -306,13 +306,13 @@ var /dev/mapper/$vg-var none luks EOF fi -if [ "$swap" != "0" ] && [ "$random_swap" == "y" ]; then +if [ "$swap_size" != "0" ] && [ "$random_swap" == "y" ]; then cat >> /tmp/debootstrap/etc/crypttab <<-EOF swap /dev/mapper/$vg-swap /dev/random swap,cipher=aes-xts-plain64:sha256 EOF fi -if [ "$swap" != "0" ] && [ "$random_swap" != "y" ]; then +if [ "$swap_size" != "0" ] && [ "$random_swap" != "y" ]; then cat >> /tmp/debootstrap/etc/crypttab <<-EOF swap /dev/mapper/$vg-swap none luks,swap EOF @@ -321,7 +321,7 @@ fi # Fstab. echo "Configuring fstab..." echo "" > /tmp/debootstrap/etc/fstab -if [ "$swap" != "0" ]; then +if [ "$swap_size" != "0" ]; then cat >> /tmp/debootstrap/etc/fstab <<-EOF /dev/mapper/swap none swap sw 0 0 EOF |