From owner-freebsd-bugs Sun Dec 23 16:20: 6 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 10A2937B41C for ; Sun, 23 Dec 2001 16:20:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id fBO0K1679783; Sun, 23 Dec 2001 16:20:01 -0800 (PST) (envelope-from gnats) Received: from agena.meridian-enviro.com (thunder.meridian-enviro.com [207.109.234.227]) by hub.freebsd.org (Postfix) with ESMTP id 94EEF37B417 for ; Sun, 23 Dec 2001 16:15:23 -0800 (PST) Received: from delta.meridian-enviro.com (delta.meridian-enviro.com [10.10.10.43]) by agena.meridian-enviro.com (8.11.6/8.9.3) with ESMTP id fBO0FMF26853 for ; Sun, 23 Dec 2001 18:15:23 -0600 (CST) (envelope-from rand@meridian-enviro.com) Received: (from rand@localhost) by delta.meridian-enviro.com (8.11.6/8.11.6) id fBO0FMm86298; Sun, 23 Dec 2001 18:15:22 -0600 (CST) (envelope-from rand) Message-Id: <200112240015.fBO0FMm86298@delta.meridian-enviro.com> Date: Sun, 23 Dec 2001 18:15:22 -0600 (CST) From: "Douglas K. Rand" Reply-To: "Douglas K. Rand" To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: misc/33132: Patch to handle otherscreens similiar to allscreens Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 33132 >Category: misc >Synopsis: Patch to handle otherscreens similiar to allscreens >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Dec 23 16:20:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: Douglas K. Rand >Release: FreeBSD 4.4-RELEASE i386 >Organization: Meridian Environmental Technology, Inc. >Environment: System: FreeBSD delta.meridian-enviro.com 4.4-RELEASE FreeBSD 4.4-RELEASE #10: Fri Oct 26 17:21:08 CDT 2001 bryanh@delta.meridian-enviro.com:/usr/obj/usr/src/sys/DELTA i386 >Description: The allscreens_flags is very nice for changing the default syscons mode. The one thing I dislike about it is that it clears the screen. This patch doesn't preserve the screen contents, it just introduces a new /etc/defaults/rc.conf knob called otherscreens_flags that affects all screens /except/ ttyv0. We use this in /etc/rc.local, but I thought others might enjoy it. The ttyv? devices other than ttyv0 are changed with the otherscreens_flags knob, this preserves the contents of the boot screen, which I find useful. I can then use the other screens at other modes, say 132x60. >How-To-Repeat: Have a boot problem, especially with a RC script, and try to debug it when allscreens_flags clears the screen on you. :) >Fix: Here is a patch to /etc/rc.syscons: --- rc.syscons.orig Sun Dec 23 18:01:52 2001 +++ rc.syscons Sun Dec 23 18:07:03 2001 @@ -180,12 +180,36 @@ done fi +# set this mode for all virtual screens except for ttyv0 +# +if [ -n "${otherscreens_flags}" ]; then + echo -n ' otherscreens' + for ttyv in /dev/ttyv*; do + case ${ttyv} in + /dev/ttyv0) + ;; + *) + vidcontrol ${otherscreens_flags} < ${ttyv} > ${ttyv} 2>&1 + ;; + esac + done +fi + # set this keyboard more for all virtual terminals # if [ -n "${allscreens_kbdflags}" ]; then echo -n ' allscreens_kbd' for ttyv in /dev/ttyv*; do kbdcontrol ${allscreens_kbdflags} < ${ttyv} > ${ttyv} 2>&1 + done +fi + +# set this keyboard more for all virtual terminals except for ttyv0 +# +if [ -n "${otherscreens_kbdflags}" ]; then + echo -n ' otherscreens_kbd' + for ttyv in /dev/ttyv*; do + kbdcontrol ${otherscreens_kbdflags} < ${ttyv} > ${ttyv} 2>&1 done fi >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message