Page MenuHomeFreeBSD

HBSD: fix long standing issue in bsdconfig's keymap selection
ClosedPublic

Authored by op on Dec 8 2016, 10:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 20, 2:35 PM
Unknown Object (File)
Sat, Apr 20, 1:33 PM
Unknown Object (File)
Thu, Apr 4, 11:06 AM
Unknown Object (File)
Mar 25 2024, 8:35 AM
Unknown Object (File)
Mar 17 2024, 4:00 PM
Unknown Object (File)
Mar 17 2024, 3:32 PM
Unknown Object (File)
Feb 22 2024, 11:59 PM
Unknown Object (File)
Feb 8 2024, 1:01 AM

Details

Summary
HBSD: 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.

Sponsored-by: HardenedBSD
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

op retitled this revision from to HBSD: fix long standing issue in bsdconfig's keymap selection.
op updated this object.
op edited the test plan for this revision. (Show Details)
op added reviewers: dteske, emaste, allanjude.
op set the repository for this revision to rS FreeBSD src repository - subversion.
op added a subscriber: lattera-gmail.com.
ed edited edge metadata.
This revision is now accepted and ready to land.Dec 11 2016, 5:04 AM
op edited edge metadata.
op removed rS FreeBSD src repository - subversion as the repository for this revision.

Updated diff.

This revision now requires review to proceed.Dec 11 2016, 2:18 PM

Looks good to me otherwise.

usr.sbin/bsdconfig/console/keymap
312 ↗(On Diff #22812)

It is remarkable to see the quotes omitted where they may be useful (around the substitution), and placed where they are definitely optional. (Occurs two times.)

usr.sbin/bsdconfig/console/keymap
312 ↗(On Diff #22812)

To be internally consistent with the rest of this file, please put a single space after the left-paren and before the right-paren. E.g., $(sysctl ...) => $( sysctl ... )

Also, what Jilles said.

usr.sbin/bsdconfig/share/keymap.subr
42 ↗(On Diff #22812)

Same thing here as line 312 of console/keymap; add whitespace and quotes

usr.sbin/bsdconfig/console/keymap
312 ↗(On Diff #22812)

Using wrong comparison operator; -ne should be !=
Both exist as operators but -ne is for numbers and != is for strings

% sh -c '[ foo -ne bar ]'
[: foo: bad number
% sh -c '[ foo != bar ]'
% echo $?
0

usr.sbin/bsdconfig/share/keymap.subr
42 ↗(On Diff #22812)

Using the wrong comparison operator; -ne is for numeric comparison, != is for string comparison

op edited edge metadata.

Make it more readable and consistent.

usr.sbin/bsdconfig/console/keymap
13 ↗(On Diff #22821)

Quotes unnecessary ... only needed if text contains *, [, ], |, ', !, #, (, ), {, }, ?, ;, or whitespace

usr.sbin/bsdconfig/share/keymap.subr
5 ↗(On Diff #22821)

same as line 13 of console/keymap -- remove unnecessary quotes around vt

usr.sbin/bsdconfig/console/keymap
313 ↗(On Diff #22821)

remove quotes around vt

usr.sbin/bsdconfig/share/keymap.subr
43 ↗(On Diff #22821)

quotes around vt

op set the repository for this revision to rS FreeBSD src repository - subversion.
op marked 2 inline comments as done.
dteske edited edge metadata.
This revision is now accepted and ready to land.Dec 12 2016, 7:52 AM
This revision was automatically updated to reflect the committed changes.