Update server-setup.sh

Added section to update vconsole and locale.conf when keymap=se to correctly set the values
This commit is contained in:
Johan S 2024-09-05 22:50:16 +02:00 committed by GitHub
parent 412806a853
commit 0aee473c50
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -187,6 +187,11 @@ keymap () {
select_option "${options[@]}" select_option "${options[@]}"
keymap=${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" echo -ne "Your key boards layout: ${keymap} \n"
export KEYMAP=$keymap export KEYMAP=$keymap
} }
@ -659,6 +664,22 @@ echo " DHCP stopped"
systemctl enable NetworkManager.service systemctl enable NetworkManager.service
echo " NetworkManager enabled" 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 " echo -ne "
------------------------------------------------------------------------- -------------------------------------------------------------------------
Cleaning Cleaning