diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-09-16 12:08:03 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-09-16 12:08:03 -0300 |
commit | 15ce1602dee881b076b52ab279c2d3502169f60d (patch) | |
tree | 4690e545cad17afdf79982f24167dd505eca0b0f /share | |
parent | 0dfd17373e9442f9f7e8e08abf074c8732bf8e5d (diff) | |
download | hydra-15ce1602dee881b076b52ab279c2d3502169f60d.tar.gz hydra-15ce1602dee881b076b52ab279c2d3502169f60d.tar.bz2 |
Updates provision
Diffstat (limited to 'share')
-rw-r--r-- | share/config/provision/tpc.conf | 5 | ||||
-rwxr-xr-x | share/hydractl/provision | 15 |
2 files changed, 15 insertions, 5 deletions
diff --git a/share/config/provision/tpc.conf b/share/config/provision/tpc.conf index b0a6e74..5b9b932 100644 --- a/share/config/provision/tpc.conf +++ b/share/config/provision/tpc.conf @@ -4,7 +4,8 @@ # interactive="n" # Interactive mode? -swap_size="20G" # Size of swap partition +swap_size="8G" # Size of swap partition +root_size="-1" # Size of root partition home_size="0" # Size of home partition var_size="0" # Size of var partition encrypt="y" # Encrypt volumes? @@ -12,6 +13,6 @@ garbage="n" # Pre-fill volumes with garbage? disable_zeroing="n" # Disable zeroing of lvm volumes? random_swap="n" # Random swap? arch="amd64" # System arch -version="wheezy" # Distro version +version="jessie" # Distro version grub="y" # Setup GRUB? mirror="http://http.debian.net/debian/" # Debian mirror diff --git a/share/hydractl/provision b/share/hydractl/provision index 70e52e5..e186213 100755 --- a/share/hydractl/provision +++ b/share/hydractl/provision @@ -94,8 +94,8 @@ function hydra_provision_config { hydra_user_config interactive y "Interactive mode? (y/n)" hydra_user_config device /dev/sdb "Destination device" - hydra_user_config root_size 20G "Size of root partition (-1 for all free space)" hydra_user_config swap_size 2000 "Swap size (in MB, 0 to not create it)" + hydra_user_config root_size 20G "Size of root partition (-1 for all free space)" hydra_user_config home_size 20G "Size of home partition (0 to not create it, -1 for all free space)" hydra_user_config var_size 20G "Size of var partition (0 to not create it, -1 for all free space)" hydra_user_config encrypt y "Encrypt volumes? (y/n)" @@ -177,15 +177,17 @@ if ! vgdisplay $vg &> /dev/null; then hydra_sudo_run vgcreate $vg $syst_device fi -# Create root partition. +# Activate volume group hydra_sudo_run vgchange -a y $vg -hydra_provision_lvcreate root $root_size # Create swap partition if [ "$swap_size" != "0" ]; then hydra_provision_lvcreate swap $swap_size fi +# Create root partition. +hydra_provision_lvcreate root $root_size + # Create home partition. if [ "$home_size" != "0" ]; then hydra_provision_lvcreate home $home_size @@ -446,6 +448,7 @@ hydra_provision_networking # Ssh. echo "Installing OpenSSH daemon..." $APT_INSTALL openssh-server -y +hydra_sudo_run chroot $WORK/ service ssh stop # Accounts. echo "Installing sudo..." @@ -457,6 +460,12 @@ hydra_sudo_run chroot $WORK passwd root # Fingerprints hydra_provision_fingerprints +# Turn off device +hydra_sudo_run umount $WORK/sys $WORK/proc $WORK/dev $WORK +hydra_sudo_run cryptsetup luksClose provision-swap +hydra_sudo_run cryptsetup luksClose provision-root +hydra_sudo_run vgchange -a n $vg + cat <<-EOF Now proceeed with final steps: |