diff options
Diffstat (limited to 'share/hydractl')
-rwxr-xr-x | share/hydractl/provision | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/share/hydractl/provision b/share/hydractl/provision index cabb40e..32a2b7a 100755 --- a/share/hydractl/provision +++ b/share/hydractl/provision @@ -126,6 +126,7 @@ function hydra_provision_config { hydra_user_config version stretch "Distro version" hydra_user_config vg $hostname "Install vg" hydra_user_config grub y "Setup GRUB? (y/n)" + hydra_user_config initramfs initramfs-tools "Initramfs manager? (initramfs-tools/dracut)" hydra_user_config mirror https://deb.debian.org/debian/ "Debian mirror" hydra_user_config ssh y "Install openssh-server? (y/n)" @@ -369,7 +370,7 @@ fi echo "Applying initial upgrades..." hydra_sudo_run chroot $WORK/ apt-get update hydra_sudo_run chroot $WORK/ apt-get upgrade -y -$APT_INSTALL locales cryptsetup lvm2 initramfs-tools -y +$APT_INSTALL locales cryptsetup lvm2 -y # Crypttab. echo "Configuring crypttab..." @@ -482,11 +483,18 @@ $APT_INSTALL linux-image-$kernel_arch -y # Initramfs. echo "Creating initramfs..." -if [ -e "$WORK/etc/cryptsetup-initramfs/conf-hook" ]; then - hydra_sudo_run sed -i -e 's/#CRYPTSETUP=/CRYPTSETUP=y/' $WORK/etc/cryptsetup-initramfs/conf-hook -fi -hydra_sudo_run chroot $WORK update-initramfs -u +if [ "$initramfs" == "initramfs-tools" ]; then + $APT_INSTALL initramfs-tools -y + + if [ -e "$WORK/etc/cryptsetup-initramfs/conf-hook" ]; then + hydra_sudo_run sed -i -e 's/#CRYPTSETUP=/CRYPTSETUP=y/' $WORK/etc/cryptsetup-initramfs/conf-hook + fi + + hydra_sudo_run chroot $WORK update-initramfs -u +else + $APT_INSTALL dracut -y +fi # Grub. if [ "$grub" == "y" ]; then |