3 # Copyright (c) 2000 The FreeBSD Project
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
9 # 1. Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer.
11 # 2. Redistributions in binary form must reproduce the above copyright
12 # notice, this list of conditions and the following disclaimer in the
13 # documentation and/or other materials provided with the distribution.
15 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 # $FreeBSD: src/etc/rc.d/syscons,v 1.9 2002/09/09 22:40:34 gordon Exp $
36 start_cmd
="syscons_start"
38 # stdin must be redirected because it might be for a serial console
45 echo -n 'Configuring syscons:'
53 echo -n ' keymap'; kbdcontrol
< ${kbddev} -l ${keymap}
63 echo -n ' keyrate'; kbdcontrol
< ${kbddev} -r ${keyrate}
73 echo -n ' keybell'; kbdcontrol
< ${kbddev} -b ${keybell}
77 # change function keys
85 while [ $# -gt 0 ]; do
86 kbdcontrol
<${kbddev} -f "$1" "$2"
98 echo -n ' cursor'; vidcontrol
< ${viddev} -c ${cursor}
108 echo -n ' scrnmap'; vidcontrol
< ${viddev} -l ${scrnmap}
118 echo -n ' font8x16'; vidcontrol
< ${viddev} -f 8x16
${font8x16}
128 echo -n ' font8x14'; vidcontrol
< ${viddev} -f 8x14
${font8x14}
138 echo -n ' font8x8'; vidcontrol
< ${viddev} -f 8x8
${font8x8}
148 echo -n ' blanktime'; vidcontrol
< ${viddev} -t ${blanktime}
158 echo -n ' screensaver'
159 for i
in `kldstat | awk '$5 ~ "^splash_.*$" { print $5 }'`; do
162 kldstat
-m ${saver}_saver || kldload
-n ${saver}_saver
166 # video history buffer
168 case ${vidhistory} in
172 echo -n ' vidhistory'; vidcontrol
< ${viddev} -h ${vidhistory}
176 # set this mode for all virtual screens
178 if [ -n "${allscreens_flags}" ]; then
179 echo -n ' allscreens'
180 for ttyv
in /dev
/ttyv
*; do
181 vidcontrol
${allscreens_flags} < ${ttyv} > ${ttyv} 2>&1
185 # set this keyboard mode for all virtual terminals
187 if [ -n "${allscreens_kbdflags}" ]; then
188 echo -n ' allscreens_kbd'
189 for ttyv
in /dev
/ttyv
*; do
190 kbdcontrol
${allscreens_kbdflags} < ${ttyv} > ${ttyv} 2>&1