Vconsole.conf KEYMAP= FONT=
_base mkinitcpio.conf v40 error (#3928) * pr1 * pr2 * pr2-2 * pr2-3 * Revert genfstab and pacstrap command changes * mistake
This commit is contained in:
parent
57bd613679
commit
6b50815eb6
|
|
@ -868,6 +868,9 @@ class Installer:
|
||||||
pacman_conf.enable(optional_repositories)
|
pacman_conf.enable(optional_repositories)
|
||||||
pacman_conf.apply()
|
pacman_conf.apply()
|
||||||
|
|
||||||
|
if locale_config:
|
||||||
|
self.set_vconsole(locale_config)
|
||||||
|
|
||||||
self.pacman.strap(self._base_packages)
|
self.pacman.strap(self._base_packages)
|
||||||
self._helper_flags['base-strapped'] = True
|
self._helper_flags['base-strapped'] = True
|
||||||
|
|
||||||
|
|
@ -1783,6 +1786,29 @@ class Installer:
|
||||||
except SysCallError:
|
except SysCallError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def set_vconsole(self, locale_config: 'LocaleConfiguration') -> None:
|
||||||
|
# use the already set kb layout
|
||||||
|
kb_vconsole: str = locale_config.kb_layout
|
||||||
|
# this is the default used in ISO other option for hdpi screens TER16x32
|
||||||
|
# can be checked using
|
||||||
|
# zgrep "CONFIG_FONT" /proc/config.gz
|
||||||
|
# https://wiki.archlinux.org/title/Linux_console#Fonts
|
||||||
|
|
||||||
|
font_vconsole = 'default8x16'
|
||||||
|
|
||||||
|
# Ensure /etc exists
|
||||||
|
vconsole_dir: Path = self.target / 'etc'
|
||||||
|
vconsole_dir.mkdir(parents=True, exist_ok=True)
|
||||||
|
vconsole_path: Path = vconsole_dir / 'vconsole.conf'
|
||||||
|
|
||||||
|
# Write both KEYMAP and FONT to vconsole.conf
|
||||||
|
vconsole_content = f'KEYMAP={kb_vconsole}\n'
|
||||||
|
# Corrects another warning
|
||||||
|
vconsole_content += f'FONT={font_vconsole}\n'
|
||||||
|
|
||||||
|
vconsole_path.write_text(vconsole_content)
|
||||||
|
info(f'Wrote to {vconsole_path} using {kb_vconsole} and {font_vconsole}')
|
||||||
|
|
||||||
def set_keyboard_language(self, language: str) -> bool:
|
def set_keyboard_language(self, language: str) -> bool:
|
||||||
info(f'Setting keyboard language to {language}')
|
info(f'Setting keyboard language to {language}')
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue