diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-09-20 19:16:33 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-09-20 19:16:33 -0300 |
commit | 7aa82be2bd031fc10a5c787f641a881a4157d00a (patch) | |
tree | 86b60f6ee16f812ad5f91f7c3851fd5c1efa07c6 /share | |
parent | 793a4889babe1f98cd2937eeef2fad0892ddfa38 (diff) | |
download | hydra-7aa82be2bd031fc10a5c787f641a881a4157d00a.tar.gz hydra-7aa82be2bd031fc10a5c787f641a881a4157d00a.tar.bz2 |
Provision: swap fixes
Diffstat (limited to 'share')
-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 |