diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-08-17 20:19:30 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-08-17 20:19:30 -0300 |
commit | 8a5c10950b8c2afd0b1a01175047cd8bbf66b513 (patch) | |
tree | 74876a62c8e04d0a99bbec114915fefc90e680d7 /share | |
parent | 8fa354282060ffc3bdd5901636e1d2686da12c59 (diff) | |
download | hydra-8a5c10950b8c2afd0b1a01175047cd8bbf66b513.tar.gz hydra-8a5c10950b8c2afd0b1a01175047cd8bbf66b513.tar.bz2 |
Provision: dracut support
Diffstat (limited to 'share')
-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 |