View | Details | Raw Unified | Return to bug 43500
Collapse All | Expand All

(-)/etc/rc.syscons (-7 / +26 lines)
Lines 171-191 Link Here
171
	;;
171
	;;
172
esac
172
esac
173
173
174
# set this mode for all virtual screens
174
# Use ${allscreens_flags) and ${allscreens_kbdflags} for all virtual terminals:
175
#
175
#
176
vt_list() {
177
	# Assume that VTs are the /dev/ttyv* devices which the shell
178
	#	redirection mechanism can successfully open; it should
179
	#	mean that the device has been kernel-configured as a VT.
180
	for ttyv in /dev/ttyv*; do
181
		if { : <${ttyv}; } 2>/dev/null; then
182
			## keep the braces to redirect the error messages
183
			echo "${ttyv}"
184
		fi
185
	done
186
}
187
176
if [ -n "${allscreens_flags}" ]; then
188
if [ -n "${allscreens_flags}" ]; then
189
	# load the "vesa" kernel module if it looks like one of the "VESA" or
190
	#	"132" modes has been requested and it's not already loaded.
191
	if [ "${allscreens_flags#VESA} != "${allscreens_flags}" -o \
192
	     "${allscreens_flags#132} != "${allscreens_flags}" ] ; then
193
		if ! kldstat -n vesa >/dev/null 2>&1; then 
194
			kldload vesa >/dev/null
195
		fi
196
	fi
197
	# continue
177
	echo -n ' allscreens'
198
	echo -n ' allscreens'
178
	for ttyv in /dev/ttyv*; do
199
	for vt in $(vt_list); do
179
		vidcontrol ${allscreens_flags} < ${ttyv} > ${ttyv} 2>&1
200
		vidcontrol ${allscreens_flags} < ${vt}
180
	done
201
	done
181
fi
202
fi
182
203
183
# set this keyboard mode for all virtual terminals
184
#
185
if [ -n "${allscreens_kbdflags}" ]; then
204
if [ -n "${allscreens_kbdflags}" ]; then
186
	echo -n ' allscreens_kbd'
205
	echo -n ' allscreens_kbd'
187
	for ttyv in /dev/ttyv*; do
206
	for vt in $(vt_list); do
188
		kbdcontrol ${allscreens_kbdflags} < ${ttyv} > ${ttyv} 2>&1
207
		kbdcontrol ${allscreens_kbdflags} < ${vt}
189
	done
208
	done
190
fi
209
fi

Return to bug 43500