| Summary: | a bug in the routine reading rc.conf | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | mellon <mellon> | ||||
| Component: | bin | Assignee: | Sheldon Hearn <sheldonh> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | 4.0-CURRENT | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
On Sun, 12 Mar 2000 04:41:57 GMT, mellon@pobox.com wrote: > - $font_current = $1 if $1 ne "NO"; > + ($font_current = $1) =~ s/"//g if $1 ne "NO"; Do you agree that the following is preferable? Ciao, Sheldon. Index: kbdmap.pl =================================================================== RCS file: /home/ncvs/src/usr.sbin/kbdmap/kbdmap.pl,v retrieving revision 1.10 diff -u -d -r1.10 kbdmap.pl --- kbdmap.pl 1999/08/28 01:16:39 1.10 +++ kbdmap.pl 2000/03/13 15:41:21 @@ -85,7 +85,7 @@ while(<F>) { /^#/ && next; - if (/^\s*font[0-9]+x[0-9]+\s*=\s*(\S+)/) { + if (/^\s*font[0-9]+x[0-9]+\s*=\s*\"?([^\s\"]+)\"?/) { $font_current = $1 if $1 ne "NO"; } } State Changed From-To: open->feedback Waiting for feedback on an alternative patch. Responsible Changed From-To: freebsd-bugs->sheldonh I'll take this one. State Changed From-To: feedback->closed Committed and merged onto the RELENG_4 and RELENG_3 branches. Unfortunately, this one missed 4.0-RELEASE. Note that kbdmap.pl is still problematic. It should really use something like a perl wrapper module for Daniel Sobral's libconf, which understands /etc/defaults/rc.conf et al, but the problem you reported has been fixed. Thanks! |
In usr.sbin/kbdmap/kbdmap.pl, the routine &font_current which reads /etc/rc.conf to determine the current font does not handle correctly the quotation marks around fontname, which causes later regexp in &vidcontrol to fail, as a consequence vidcontrol(1) is not invoked. How-To-Repeat: Install a non-standard font not matching your LANG vars in /etc/rc.conf . Run vidfont(1), but do not choose any font, rather exit by Canceling. Your font will be changed to the one matching your $LANG, but then it'll fail to revert to your default font on exit.