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 $
28 # $DragonFly: src/etc/rc.d/syscons,v 1.5 2005/11/19 21:47:32 swildner Exp $
37 start_cmd
="syscons_start"
39 # stdin must be redirected because it might be for a serial console
46 echo -n 'Configuring syscons:'
54 echo -n ' keymap'; kbdcontrol
< ${kbddev} -l ${keymap}
64 echo -n ' keyrate'; kbdcontrol
< ${kbddev} -r ${keyrate}
74 echo -n ' keybell'; kbdcontrol
< ${kbddev} -b ${keybell}
78 # change function keys
86 while [ $# -gt 0 ]; do
87 kbdcontrol
<${kbddev} -f "$1" "$2"
99 echo -n ' cursor'; vidcontrol
< ${viddev} -c ${cursor}
109 echo -n ' scrnmap'; vidcontrol
< ${viddev} -l ${scrnmap}
119 echo -n ' font8x16'; vidcontrol
< ${viddev} -f 8x16
${font8x16}
129 echo -n ' font8x14'; vidcontrol
< ${viddev} -f 8x14
${font8x14}
139 echo -n ' font8x8'; vidcontrol
< ${viddev} -f 8x8
${font8x8}
149 echo -n ' blanktime'; vidcontrol
< ${viddev} -t ${blanktime}
159 echo -n ' screensaver'
160 for i
in `kldstat | awk '$5 ~ "^splash_.*$" { print $5 }'`; do
163 kldstat
-v |
grep -q _saver || kldload
${saver}_saver
167 # video history buffer
169 case ${vidhistory} in
173 echo -n ' vidhistory'; vidcontrol
< ${viddev} -h ${vidhistory}
177 # set this mode for all virtual screens
179 if [ -n "${allscreens_flags}" ]; then
180 echo -n ' allscreens'
181 for ttyv
in /dev
/ttyv
*; do
182 vidcontrol
${allscreens_flags} < ${ttyv} > ${ttyv} 2>&1
186 # set this keyboard mode for all virtual terminals
188 if [ -n "${allscreens_kbdflags}" ]; then
189 echo -n ' allscreens_kbd'
190 for ttyv
in /dev
/ttyv
*; do
191 kbdcontrol
${allscreens_kbdflags} < ${ttyv} > ${ttyv} 2>&1