From 0aee473c506ac5adb45df75c8c796ac55fa95114 Mon Sep 17 00:00:00 2001 From: Johan S Date: Thu, 5 Sep 2024 22:50:16 +0200 Subject: [PATCH] Update server-setup.sh Added section to update vconsole and locale.conf when keymap=se to correctly set the values --- .../system-setup/arch/server-setup.sh | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/commands/system-setup/arch/server-setup.sh b/src/commands/system-setup/arch/server-setup.sh index 87400b22..b498790e 100755 --- a/src/commands/system-setup/arch/server-setup.sh +++ b/src/commands/system-setup/arch/server-setup.sh @@ -187,6 +187,11 @@ keymap () { select_option "${options[@]}" keymap=${options[$?]} + # Check if the selected keymap is "se" and set it to "se-lat6" for correct layout. + if [[ "$keymap" == "se" ]]; then + keymap="se-lat6" + fi + echo -ne "Your key boards layout: ${keymap} \n" export KEYMAP=$keymap } @@ -659,6 +664,22 @@ echo " DHCP stopped" systemctl enable NetworkManager.service echo " NetworkManager enabled" +# @description Edit vconsole.conf and locale.conf for persistence +echo -ne " +------------------------------------------------------------------------- + Updating vconsole.conf and locale.conf +------------------------------------------------------------------------- +" +# Update /etc/vconsole.conf +echo "KEYMAP=${KEYMAP}" > /mnt/etc/vconsole.conf + +# Update /etc/locale.conf +echo "LANG=en_US.UTF-8" > /mnt/etc/locale.conf + +# Ensure the locale is generated +echo "Generating locales..." +arch-chroot /mnt locale-gen + echo -ne " ------------------------------------------------------------------------- Cleaning