From owner-freebsd-bugs Wed May 12 10:30:19 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id C425C15E95 for ; Wed, 12 May 1999 10:30:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id KAA78901; Wed, 12 May 1999 10:30:02 -0700 (PDT) (envelope-from gnats@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 To: freebsd-gnats-submit@freebsd.org X-Send-Pr-Version: www-1.0 Subject: bin/11671: "vidfont -r" fails, asking for font size Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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? ``""'' 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