Fix long standing issue in bsdconfig's keymap selection
Since the translation to vt as terminal emulator, the keymaps files path has changed and this change does not get followed in bsdconfig. This implicates boot time warnings about a wrong keymap file, what is very confusing for the new users and for me too, so initialize the default keymaps search path depending on terminal type. Differential Revision: https://reviews.freebsd.org/D8734 Submitted by: Oliver Pinter <oliver.pinter@hardenedbsd.org> Reviewed by: ed, jilles, dteske MFC after: 3 days X-MFC-to: stable/11 Sponsored by: HardenedBSD Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
This commit is contained in:
parent
b88f76f211
commit
df5af8fd49
@ -172,6 +172,7 @@ dialog_menu_main()
|
||||
uk.iso) defaultitem="$msg_uk_iso" ;;
|
||||
ua.koi8-u) defaultitem="$msg_ukrainian_koi8_u" ;;
|
||||
ua.koi8-u.shift.alt) defaultitem="$msg_ukrainian_koi8_u_koi8_r" ;;
|
||||
us.ctrl) defaultitem="$msg_usa_capslock_ctrl" ;;
|
||||
us.pc-ctrl) defaultitem="$msg_usa_capslock_ctrl" ;;
|
||||
us.dvorak) defaultitem="$msg_usa_dvorak" ;;
|
||||
us.dvorakl) defaultitem="$msg_usa_dvorak_left" ;;
|
||||
@ -307,7 +308,12 @@ while :; do
|
||||
uk_iso) keymap_to_set="uk.iso" ;;
|
||||
ukrainian_koi8_u) keymap_to_set="ua.koi8-u" ;;
|
||||
ukrainian_koi8_u_koi8_r) keymap_to_set="ua.koi8-u.shift.alt" ;;
|
||||
usa_capslock_ctrl) keymap_to_set="us.pc-ctrl" ;;
|
||||
usa_capslock_ctrl)
|
||||
case "$( sysctl -n kern.vty )" in
|
||||
vt) keymap_to_set="us.ctrl" ;;
|
||||
*) keymap_to_set="us.pc-ctrl" ;;
|
||||
esac
|
||||
;;
|
||||
usa_dvorak) keymap_to_set="us.dvorak" ;;
|
||||
usa_dvorak_left) keymap_to_set="us.dvorakl" ;;
|
||||
usa_dvorak_right) keymap_to_set="us.dvorakr" ;;
|
||||
|
@ -39,7 +39,10 @@ f_include $BSDCFG_SHARE/struct.subr
|
||||
# Defaults taken from usr.sbin/kbdmap/kbdmap.h
|
||||
#
|
||||
: ${DEFAULT_LANG:=en}
|
||||
: ${DEFAULT_KEYMAP_DIR:=/usr/share/syscons/keymaps}
|
||||
case "$( sysctl -n kern.vty )" in
|
||||
vt) : ${DEFAULT_KEYMAP_DIR:=/usr/share/vt/keymaps} ;;
|
||||
*) : ${DEFAULT_KEYMAP_DIR:=/usr/share/syscons/keymaps} ;;
|
||||
esac
|
||||
|
||||
############################################################ GLOBALS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user