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)
Sun, Nov 24, 5:58 AM
Unknown Object (File)
Wed, Nov 13, 4:15 AM
Unknown Object (File)
Tue, Nov 5, 3:57 AM
Unknown Object (File)
Tue, Nov 5, 2:09 AM
Unknown Object (File)
Tue, Oct 29, 4:29 AM
Unknown Object (File)
Tue, Oct 29, 4:06 AM
Unknown Object (File)
Oct 24 2024, 9:48 PM
Unknown Object (File)
Oct 4 2024, 11:29 PM

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.