Subject: Re: WSDISPLAY_SCROLLSUPPORT number of lines adjustment.
To: Eric Haszlakiewicz <erh@jodi.nimenees.com>
From: Andreas Wrede <andreas@planix.com>
List: tech-kern
Date: 07/25/2005 21:14:23
--Apple-Mail-7-151859177
Content-Type: multipart/mixed; boundary=Apple-Mail-6-151859058


--Apple-Mail-6-151859058
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed


On Jul 23, 2005, at 12:11 , Eric Haszlakiewicz wrote:

> On Sat, Jul 23, 2005 at 03:42:55AM -0400, Matthew Mondor wrote:
>
>> There's always dmesg, /var/run/dmesg.boot and /var/log/ :) With
>> screen(1), I never found that such a scrolling buffer feature was
>> necessary, also.  Of course /dev/console is a special case which  
>> can get
>> kernel messages, but those are available in the dmesg buffer so  
>> are not
>> lost
>>
>
>     That's fine for kernel messages, but doesn't help at all with  
> output
> from rc.d.

The attached patch for rc "fixes" that issue by logging rc script  
output to a file on a tmpfs and the saving it to /var/log.

-- 
     aew


--Apple-Mail-6-151859058
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	x-unix-mode=0644;
	name="rc.patch.txt"
Content-Disposition: attachment;
	filename=rc.patch.txt

Index: rc
===================================================================
RCS file: /cvsroot/src/etc/rc,v
retrieving revision 1.162
diff -u -r1.162 rc
--- rc	4 Jan 2003 15:27:43 -0000	1.162
+++ rc	26 Jul 2005 01:02:45 -0000
@@ -35,13 +35,36 @@
 trap : INT
 trap "echo 'Boot interrupted.'; exit 1" QUIT
 
-date
+_now=`date`
+if checkyesno rc_logoutput; then
+	if [ ! -d /rclog ]; then
+		echo "error: /rclog non-existant, not logging rc output"
+		rc_logoutput=NO
+	else
+		/sbin/mount_mfs -b 4096 -f 512 -s 20480  -n 1024 -p 0755 swap /rclog
+		echo "rc start $_now"  >  /rclog/log
+	fi
+fi
+echo $_now
 
 files=$(rcorder -s nostart ${rc_rcorder_flags} /etc/rc.d/*)
 
-for _rc_elem in $files; do
-	run_rc_script $_rc_elem start
-done
+if checkyesno rc_logoutput; then
+	for _rc_elem in $files; do
+		run_rc_script $_rc_elem start >> /rclog/log 2>&1
+	done
+else
+	for _rc_elem in $files; do
+		run_rc_script $_rc_elem start
+	done
+fi
 
-date
+_now=`date`
+if checkyesno rc_logoutput; then
+	cat /rclog/log >> /var/log/rclog
+	umount /rclog
+	echo "rc done $_now" >>  /var/log/rclog
+fi
+
+echo $_now
 exit 0

--Apple-Mail-6-151859058--

--Apple-Mail-7-151859177
content-type: application/pgp-signature; x-mac-type=70674453;
	name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFC5Y5vEh/h9J/TQyERArlsAJ9D2kn5hvPBALlIpCc4qADpApvdRwCdG1CN
S1/HpRr6hRPD8GNhhV4V6Nk=
=dQkL
-----END PGP SIGNATURE-----

--Apple-Mail-7-151859177--