svn commit: r318891 - in head/usr.sbin/bsdconfig: console share
Devin Teske
dteske at FreeBSD.org
Thu May 25 18:16:19 UTC 2017
Author: dteske
Date: Thu May 25 18:16:17 2017
New Revision: 318891
URL: https://svnweb.freebsd.org/changeset/base/318891
Log:
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 at 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 at hardenedbsd.org>
Modified:
head/usr.sbin/bsdconfig/console/keymap
head/usr.sbin/bsdconfig/share/keymap.subr
Modified: head/usr.sbin/bsdconfig/console/keymap
==============================================================================
--- head/usr.sbin/bsdconfig/console/keymap Thu May 25 17:58:01 2017 (r318890)
+++ head/usr.sbin/bsdconfig/console/keymap Thu May 25 18:16:17 2017 (r318891)
@@ -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" ;;
Modified: head/usr.sbin/bsdconfig/share/keymap.subr
==============================================================================
--- head/usr.sbin/bsdconfig/share/keymap.subr Thu May 25 17:58:01 2017 (r318890)
+++ head/usr.sbin/bsdconfig/share/keymap.subr Thu May 25 18:16:17 2017 (r318891)
@@ -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
More information about the svn-src-head
mailing list