diff options
Diffstat (limited to 'share/hydractl/provision')
-rwxr-xr-x | share/hydractl/provision | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/share/hydractl/provision b/share/hydractl/provision index e7877c3..96784c5 100755 --- a/share/hydractl/provision +++ b/share/hydractl/provision @@ -98,13 +98,13 @@ function hydra_provision_config { hydra_user_config root_size 20G "Size of root partition (-1 for all free space)" if [ "$root_size" != "-1" ]; then - hydra_user_config home_size 20G "Size of home partition (0 to not create it, -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)" else home_size="0" fi if [ "$root_size" != "-1" ] && [ "$home_size" != "-1" ]; then - hydra_user_config var_size 20G "Size of var 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)" else var_size="0" fi @@ -112,11 +112,11 @@ function hydra_provision_config { hydra_user_config encrypt y "Encrypt volumes? (if RAID, then encryption is default) (y/n)" if [ "$encrypt" == "y" ]; then - hydra_user_config garbage y "Pre-fill volumes with garbage? (y/n)" + hydra_user_config garbage y "Pre-fill volumes with garbage? (y/n)" fi if [ "$swap_size" != "0" ]; then - hydra_user_config random_swap y "Random swap? (y/n)" + hydra_user_config random_swap y "Random swap? (y/n)" fi hydra_user_config disable_zeroing n "Disable zeroing of LVM volumes? (y/n)" @@ -484,7 +484,7 @@ if [ "$grub" == "y" ]; then echo "Setting up GRUB..." $APT_INSTALL grub-pc -y - sed -i -e 's/^GRUB_CMDLINE_LINUX_DEFAULT="quiet"$/GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor/"' \ + hydra_sudo_run sed -i -e 's/^GRUB_CMDLINE_LINUX_DEFAULT="quiet"$/GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor"/' \ $WORK/etc/default/grub hydra_sudo_run chroot $WORK/ update-grub @@ -499,6 +499,8 @@ if [ "$grub" == "y" ]; then # Fix menu entry hydra_sudo_run sed -i -e "s|root=/dev/mapper/provision-root|root=/dev/mapper/root|g" $WORK/boot/grub/grub.cfg hydra_sudo_run sed -i -e "s|root=/dev/mapper/$hostname-unlocked|root=/dev/mapper/root|g" $WORK/boot/grub/grub.cfg + else + hydra_sudo_run chroot $WORK/ grub-install --recheck --force $device fi fi @@ -531,6 +533,11 @@ if [ "$ssh" == "y" ]; then fi echo "Umounting installation device..." + +if [ "$grub" == "y" ] && [ "$encrypt" != "y" ]; then + hydra_sudo_run umount $WORK/boot +fi + hydra_sudo_run umount $WORK/sys $WORK/proc $WORK/dev $WORK if [ "$swap_size" != "0" ]; then |