Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 May 1999 10:28:26 -0700 (PDT)
From:      malachai@iname.com
To:        freebsd-gnats-submit@freebsd.org
Subject:   bin/11671: "vidfont -r" fails, asking for font size
Message-ID:  <19990512172826.2B9621544F@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         11671
>Category:       bin
>Synopsis:       "vidfont -r" fails, asking for font size
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 12 10:30:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Shawn Halpenny
>Release:        3.1-STABLE i386
>Organization:
>Environment:
>Description:
Using "vidfont -r" to restore the console font to that defined
in /etc/rc.conf fails.  The font remains unchanged and the message

Which font size? ``"<font-name-from-rc.conf>"''

is displayed.
>How-To-Repeat:
vidfont -r
>Fix:
Problem is that the regular expression used to grab the name from the
font field in rc.conf takes all non-spaces after the '=', meaning any
enclosing quotation marks are included.  While the regular expression
could be modified, it might be better to simply strip out quotes from
the matched text (then if quotes are ever optional for values in
rc.conf, this will still work without complicating the regex).
This is the patch:

--- /usr/src/usr.sbin/kbdmap/kbdmap.pl	Tue Apr  6 09:28:37 1999
+++ /usr/sbin/kbdmap	Wed May 12 13:13:32 1999
@@ -87,6 +87,7 @@
 	/^#/ && next;
 	if (/^\s*font[0-9]+x[0-9]+\s*=\s*(\S+)/) {
 	    $font_current = $1 if $1 ne "NO";
+	    $font_current =~ s/"//g;
 	}
     }
     close F;

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990512172826.2B9621544F>