From rand@meridian-enviro.com  Sun Dec 23 16:15:24 2001
Return-Path: <rand@meridian-enviro.com>
Received: from agena.meridian-enviro.com (thunder.meridian-enviro.com [207.109.234.227])
	by hub.freebsd.org (Postfix) with ESMTP id 94EEF37B417
	for <FreeBSD-gnats-submit@freebsd.org>; 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 <FreeBSD-gnats-submit@freebsd.org>; 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" <rand@meridian-enviro.com>
Reply-To: "Douglas K. Rand" <rand@meridian-enviro.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Patch to handle otherscreens similiar to allscreens
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         33132
>Category:       misc
>Synopsis:       Patch to handle otherscreens similiar to allscreens
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 23 16:20:00 PST 2001
>Closed-Date:    Wed Jan 9 08:37:46 PST 2002
>Last-Modified:  Wed Jan  9 08:40:01 PST 2002
>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:

From: Sheldon Hearn <sheldonh@starjuice.net>
To: "Douglas K. Rand" <rand@meridian-enviro.com>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: misc/33132: Patch to handle otherscreens similiar to allscreens 
Date: Wed, 09 Jan 2002 16:37:20 +0200

 On Sun, 23 Dec 2001 18:15:22 CST, "Douglas K. Rand" wrote:
 
 > >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.
 
 Could you show an allscreens_flags value that clears vty0?
 
 Ciao,
 Sheldon.
State-Changed-From-To: open->feedback 
State-Changed-By: sheldonh 
State-Changed-When: Wed Jan 9 06:52:16 PST 2002 
State-Changed-Why:  
Waiting for a "how to repeat". 

Please copy your feedback to <bug-followup@freebsd.org>, using the 
subject line of this message. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=33132 

From: "Douglas K. Rand" <rand@meridian-enviro.com>
To: Sheldon Hearn <sheldonh@starjuice.net>
Cc: <bug-followup@freebsd.org>
Subject: Re: misc/33132: Patch to handle otherscreens similiar to allscreens 
Date: Wed, 09 Jan 2002 09:24:08 -0600

 Sheldon> Could you show an allscreens_flags value that clears vty0?
 
 Sure.
 
 =46rom the /etc/rc.conf of one of our FreeBSD 4.4 systems:
 
 allscreens_flags=3D"132x60"
 
 When it is going through rc.syscons, it clears the screen just after
 "allscreens". =
 
 
 Oh dear.  The text is still there in the scroll back buffer.  I had
 checked that on another system that was running and older version of
 FreeBSD. =
 
 
 Seeing the text in the scroll back buffer seriously undermines my
 bugreport.  ;^)

From: Sheldon Hearn <sheldonh@starjuice.net>
To: "Douglas K. Rand" <rand@meridian-enviro.com>
Cc: bug-followup@freebsd.org
Subject: Re: misc/33132: Patch to handle otherscreens similiar to allscreens 
Date: Wed, 09 Jan 2002 17:57:33 +0200

 On Wed, 09 Jan 2002 09:24:08 CST, "Douglas K. Rand" wrote:
 
 > Seeing the text in the scroll back buffer seriously undermines my
 > bugreport.  ;^)
 
 *lol*
 
 Can I close the PR?
 
 Ciao,
 Sheldon.
State-Changed-From-To: feedback->closed 
State-Changed-By: sheldonh 
State-Changed-When: Wed Jan 9 08:37:46 PST 2002 
State-Changed-Why:  
Closed with originator's permission. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=33132 

From: "Douglas K. Rand" <rand@meridian-enviro.com>
To: Sheldon Hearn <sheldonh@starjuice.net>
Cc: bug-followup@freebsd.org
Subject: Re: misc/33132: Patch to handle otherscreens similiar to allscreens 
Date: Wed, 09 Jan 2002 10:34:13 -0600

 Doug> Seeing the text in the scroll back buffer seriously undermines
 Doug> my bugreport.  ;^)
 
 Sheldon> *lol*
 
 Sheldon> Can I close the PR?
 
 You bet.  Sorry for the hassle.
 
>Unformatted:
