From 0a379f40f18f1050af348c86c8d5ca9a388ae3c1 Mon Sep 17 00:00:00 2001 From: i-c-u-p <96894903+i-c-u-p@users.noreply.github.com> Date: Thu, 28 Apr 2022 02:33:08 +0000 Subject: [PATCH] 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 --- easy-arch.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/easy-arch.sh b/easy-arch.sh index 8fc8541..e6d06be 100755 --- a/easy-arch.sh +++ b/easy-arch.sh @@ -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