allscreens extension

Nikos Vassiliadis nvass at gmx.com
Wed Jan 11 17:16:43 UTC 2012


Hi,

I am using this small addition to etc/rc.d/syscons.
It extends the allscreens functionality with an
allscreens_exclude variable which controls the virtual
terminals that are excluded from running the allscreens
command. I use it mainly to exclude ttyv0 from switching
to raster mode while allscreens are set to raster mode.

I can file a proper PR if that sounds interesting to the project?

Nikos
-------------- next part --------------
Index: syscons
===================================================================
RCS file: /home/ncvs/src/etc/rc.d/syscons,v
retrieving revision 1.23.2.1
diff -u -r1.23.2.1 syscons
--- syscons	23 Sep 2011 00:51:37 -0000	1.23.2.1
+++ syscons	31 Oct 2011 11:15:42 -0000
@@ -250,7 +250,12 @@
 	if [ -n "${allscreens_flags}" ]; then
 		sc_init
 		echo -n ' allscreens'
-		for ttyv in /dev/ttyv*; do
+		if [ -n "$allscreens_exclude" ]; then
+			ttyvs=`printf '%s\n' /dev/ttyv* | egrep -v "$allscreens_exclude"`
+		else
+			ttyvs=/dev/ttyv*
+		fi
+		for ttyv in $ttyvs; do
 			vidcontrol ${allscreens_flags} < ${ttyv} > ${ttyv} 2>&1
 		done
 	fi


More information about the freebsd-rc mailing list