Update util-base.sh

merge-requests/273/head
Chrysostomus 7 years ago committed by GitHub
parent 56da969b01
commit f39f90d849
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -630,18 +630,25 @@ bios_bootloader() {
}
boot_encrypted_setting() {
# Check if there is separate encrypted /boot partition
if $(lsblk | grep '/mnt/boot' | grep -q 'crypt' ); then
echo "GRUB_ENABLE_CRYPTODISK=y" >> /mnt/etc/default/grub
# Check if root is encrypted and there is no separate /boot
elif $(lsblk | grep "/mnt$" | grep -q 'crypt' ) && [[ $(lsblk | grep "/mnt/boot$") == "" ]]; then
echo "GRUB_ENABLE_CRYPTODISK=y" >> /mnt/etc/default/grub
# Check if root is on encrypted lvm volume
elif $(lsblk -i | tac | sed -n -e "/$root_name/,/disk/p" | awk '{print $6}' | grep -q crypt) && [[ $(lsblk | grep "/mnt/boot$") == "" ]]; then
echo "GRUB_ENABLE_CRYPTODISK=y" >> /mnt/etc/default/grub
# Check if there is separate /boot partition
if [[ $(lsblk | grep "/mnt/boot$") == "" ]]; then
#There is no separate /boot parition
# Check if root is encrypted
if $(lsblk | grep "/mnt$" | grep -q 'crypt' ); then
echo "GRUB_ENABLE_CRYPTODISK=y" >> /mnt/etc/default/grub
# Check if root is on encrypted lvm volume
elif $(lsblk -i | tac | sed -n -e "/$root_name/,/disk/p" | awk '{print $6}' | grep -q crypt); then
echo "GRUB_ENABLE_CRYPTODISK=y" >> /mnt/etc/default/grub
fi
elif
# There is a separate /boot. Check if it is encrypted
if $(lsblk | grep '/mnt/boot' | grep -q 'crypt' ); then
echo "GRUB_ENABLE_CRYPTODISK=y" >> /mnt/etc/default/grub
fi
else
true
fi
}
recheck_luks() {
@ -847,4 +854,4 @@ create_new_user() {
#arch_chroot "cp /etc/skel/.bashrc /home/${USER}"
arch_chroot "chown -R ${USER}:${USER} /home/${USER}"
[[ -e ${MOUNTPOINT}/etc/sudoers ]] && sed -i '/%wheel ALL=(ALL) ALL/s/^#//' ${MOUNTPOINT}/etc/sudoers
}
}

Loading…
Cancel
Save