Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / etc / rc.syscons
CommitLineData
984263bc
MD
1#!/bin/sh -
2#
3# Copyright (c) 2000 The FreeBSD Project
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:
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.
14#
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
25# SUCH DAMAGE.
26#
27# $FreeBSD: src/etc/rc.syscons,v 1.1.2.5 2002/11/04 07:03:59 dougb Exp $
1de703da 28# $DragonFly: src/etc/Attic/rc.syscons,v 1.2 2003/06/17 04:24:45 dillon Exp $
984263bc
MD
29# Do syscons configuration
30#
31
32# stdin must be redirected because it might be for a serial console
33#
34kbddev=/dev/ttyv0
35viddev=/dev/ttyv0
36
37# Handle diskless boots, and other situations where syscons is not present
38#
39if [ -c "${kbddev}" ]; then
40
41echo -n 'Configuring syscons:'
42
43# keymap
44#
45case ${keymap} in
46[Nn][Oo] | '')
47 ;;
48*)
49 echo -n ' keymap'; kbdcontrol < ${kbddev} -l ${keymap}
50 ;;
51esac
52
53# keyrate
54#
55case ${keyrate} in
56[Nn][Oo] | '')
57 ;;
58*)
59 echo -n ' keyrate'; kbdcontrol < ${kbddev} -r ${keyrate}
60 ;;
61esac
62
63# keybell
64#
65case ${keybell} in
66[Nn][Oo] | '')
67 ;;
68*)
69 echo -n ' keybell'; kbdcontrol < ${kbddev} -b ${keybell}
70 ;;
71esac
72
73# change function keys
74#
75case ${keychange} in
76[Nn][Oo] | '')
77 ;;
78*)
79 echo -n ' keychange'
80 set - ${keychange}
81 while [ $# -gt 0 ]; do
82 kbdcontrol <${kbddev} -f "$1" "$2"
83 shift; shift
84 done
85 ;;
86esac
87
88# cursor type
89#
90case ${cursor} in
91[Nn][Oo] | '')
92 ;;
93*)
94 echo -n ' cursor'; vidcontrol < ${viddev} -c ${cursor}
95 ;;
96esac
97
98# screen mapping
99#
100case ${scrnmap} in
101[Nn][Oo] | '')
102 ;;
103*)
104 echo -n ' scrnmap'; vidcontrol < ${viddev} -l ${scrnmap}
105 ;;
106esac
107
108# font 8x16
109#
110case ${font8x16} in
111[Nn][Oo] | '')
112 ;;
113*)
114 echo -n ' font8x16'; vidcontrol < ${viddev} -f 8x16 ${font8x16}
115 ;;
116esac
117
118# font 8x14
119#
120case ${font8x14} in
121[Nn][Oo] | '')
122 ;;
123*)
124 echo -n ' font8x14'; vidcontrol < ${viddev} -f 8x14 ${font8x14}
125 ;;
126esac
127
128# font 8x8
129#
130case ${font8x8} in
131[Nn][Oo] | '')
132 ;;
133*)
134 echo -n ' font8x8'; vidcontrol < ${viddev} -f 8x8 ${font8x8}
135 ;;
136esac
137
138# blank time
139#
140case ${blanktime} in
141[Nn][Oo] | '')
142 ;;
143*)
144 echo -n ' blanktime'; vidcontrol < ${viddev} -t ${blanktime}
145 ;;
146esac
147
148# screen saver
149#
150case ${saver} in
151[Nn][Oo] | '')
152 ;;
153*)
154 echo -n ' screensaver'
155 for i in `kldstat | awk '$5 ~ "^splash_.*$" { print $5 }'`; do
156 kldunload ${i}
157 done
158 kldstat -v | grep -q _saver || kldload ${saver}_saver
159 ;;
160esac
161
162# mouse daemon
163#
164case ${moused_enable} in
165[Yy][Ee][Ss])
166 echo -n ' moused'
167 moused ${moused_flags} -p ${moused_port} -t ${moused_type}
168 case ${mousechar_start} in
169 [Nn][Oo] | '')
170 ;;
171 *)
172 echo -n ' mousechar_start'; vidcontrol < ${viddev} -M ${mousechar_start}
173 ;;
174 esac
175 vidcontrol < ${viddev} -m on
176 ;;
177esac
178
179# set this mode for all virtual screens
180#
181if [ -n "${allscreens_flags}" ]; then
182 echo -n ' allscreens'
183 for ttyv in /dev/ttyv*; do
184 vidcontrol ${allscreens_flags} < ${ttyv} > ${ttyv} 2>&1
185 done
186fi
187
188# set this keyboard mode for all virtual terminals
189#
190if [ -n "${allscreens_kbdflags}" ]; then
191 echo -n ' allscreens_kbd'
192 for ttyv in /dev/ttyv*; do
193 kbdcontrol ${allscreens_kbdflags} < ${ttyv} > ${ttyv} 2>&1
194 done
195fi
196
197echo '.'
198fi