fix chroot+fix question encrypted

This commit is contained in:
lulzette 2021-01-24 18:52:30 +03:00
parent 31649a6948
commit 4a08cb45d4

View File

@ -44,8 +44,8 @@ do
read -p "Target drive is " targetDrive
targetDrive=/dev/$targetDrive
done
echo "Encrypted? (Y/n) "
while read -r -n 1 answer ; do
#encrypted?
while read -r -n 1 answer -p "Encrypted? (Y/N)" ; do
if [[ $answer = [YyNn] ]]; then
[[ $answer = [Yy] ]] && encryptedDevice=true && echo "WARNING You will be asked for password later" #read -p "Password: " encryptedPassword
[[ $answer = [Nn] ]] && encryptedDevice=false
@ -176,7 +176,7 @@ echo "==> mkinitcpio and update grub..."
#cat /mnt/etc/mkinitcpio.conf | sed 's/encrypt //' > /mnt/etc/mkinitcpio.conf #remove cryptdevice, no encrypted fs today :c
#chroot env
cat << EOF | chroot /mnt
cat << EOF | chroot /mnt /bin/sh
mkinitcpio -P
grub-mkconfig -o /boot/grub/grub.cfg
grub-install $targetDrive