fix keyboard/locale not being installed, and kb select function

use the right var when checking if the selected keymap exists, don't skip prompt for keyboard layout if the user entered "/" and don't include the installation of the keymap/locale in the selection functions since no subvolumes are mounted when they're called
This commit is contained in:
i-c-u-p 2022-04-28 02:33:08 +00:00
parent 2fb11dbfb1
commit 0a379f40f1
No known key found for this signature in database
GPG key ID: ABB80C12170FC0D1

View file

@ -194,7 +194,6 @@ locale_selector () {
locale_selector
fi
sed -i "$locale/s/^#//" /etc/locale.gen
echo "LANG=$locale" > /mnt/etc/locale.conf
esac
}
@ -204,14 +203,14 @@ keyboard_selector () {
case $kblayout in
'') print "US keyboard layout will be used by default."
kblayout="us";;
'/') localectl list-keymaps;;
*) if ! $(localectl list-keymaps | grep -Fxq $locale); then
'/') localectl list-keymaps
keyboard_selector;;
*) if ! $(localectl list-keymaps | grep -Fxq $kblayout); then
print "The specified keymap doesn't exist."
keyboard_selector
fi
print "Changing layout to $kblayout."
loadkeys $kblayout
echo "KEYMAP=$kblayout" > /mnt/etc/vconsole.conf;;
esac
}
@ -314,6 +313,10 @@ mount -o $mountopts,subvol=@var_pkgs $BTRFS /mnt/var/cache/pacman/pkg
chattr +C /mnt/var/log
mount $ESP /mnt/boot/
# Configure selected keyboard layout and locale
echo "KEYMAP=$kblayout" > /mnt/etc/vconsole.conf
echo "LANG=$locale" > /mnt/etc/locale.conf
# Pacstrap (setting up a base sytem onto the new root).
print "Installing the base system (it may take a while)."
pacstrap /mnt --needed base $kernel $microcode linux-firmware $kernel-headers btrfs-progs grub grub-btrfs rsync efibootmgr snapper reflector base-devel snap-pac zram-generator >/dev/null