From nobody@FreeBSD.ORG Wed May 12 10:28:29 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 2B9621544F; Wed, 12 May 1999 10:28:26 -0700 (PDT)
Message-Id: <19990512172826.2B9621544F@hub.freebsd.org>
Date: Wed, 12 May 1999 10:28:26 -0700 (PDT)
From: malachai@iname.com
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: "vidfont -r" fails, asking for font size
X-Send-Pr-Version: www-1.0

>Number:         11671
>Category:       bin
>Synopsis:       "vidfont -r" fails, asking for font size
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    wosch
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 12 10:30:01 PDT 1999
>Closed-Date:    Sun Jun 17 19:42:28 PDT 2001
>Last-Modified:  Sun Jun 17 19:44:17 PDT 2001
>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:
Responsible-Changed-From-To: freebsd-bugs->wosch 
Responsible-Changed-By: schweikh 
Responsible-Changed-When: Sun Jun 17 07:36:35 PDT 2001 
Responsible-Changed-Why:  
vidfont is Wolfram's baby. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=11671 
State-Changed-From-To: open->closed 
State-Changed-By: wosch 
State-Changed-When: Sun Jun 17 19:42:28 PDT 2001 
State-Changed-Why:  
Already fixed in rev 1.11 src/usr.sbin/kbdmap/kbdmap.pl  
one year ago, duplicated PR 17330 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=11671 
>Unformatted:
