blob: 32d89c2de66dd4cb6f5531011c3d4ee80d8f9c53 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
|
#---------------------------------------------------------------------------
#
# sample rc.local
# ---------------
#
# last edit-date: [Sun Feb 19 19:20:42 1995]
#
#---------------------------------------------------------------------------
#
# NOTE:
# assumptions: - 8 screens configured
# - /dev/ttyv0 ... /dev/ttyv7 exist
#
#---------------------------------------------------------------------------
# start xdm on screen 8
#xdm_start=YES
xdm_start=NO
# setup german keyboard layout
#set_keybd=YES
set_keybd=NO
# setup keyboard delay & rate
set_keydr=YES
# very fast settings
set_keydr_rate=0
set_keydr_delay=0
#set_keydr=NO
# constuct a new /etc/motd file
construct_motd=NO
#construct_motd=YES
# setup cursor start and end scanline
set_cursor=YES
#set_cursor=NO
# block cursor
set_cur_start=0
set_cur_end=15
#-----------------------------------------------------
# construct /etc/motd file
#-----------------------------------------------------
if [ X${construct_motd} = X"YES" ]
then
if [ -f /netbsd ]
then
if [ ! -f /etc/motd ]; then
install -c -o root -g wheel -m 664 /dev/null /etc/motd
fi
T=/tmp/_motd
rm -f $T
sysctl -n kern.version | sed 1q > $T
echo "" >> $T
sed '1,/^$/d' < /etc/motd >> $T
cmp -s $T /etc/motd || cp $T /etc/motd
rm -f $T
echo 'runtime link editor directory cache'
ldconfig
else
T=/tmp/_motd
rm -f $T
uname -a > $T
echo "" >> $T
sed '1,/^$/d' < /etc/motd >> $T
cp $T /etc/motd
chmod 644 /etc/motd
rm -f $T
fi
fi
#-----------------------------------------------------
# local daemons
#-----------------------------------------------------
echo -n 'starting local daemons:'
# Kerberos runs ONLY on the Kerberos server machine
if [ X${kerberos_server} = X"YES" ]; then
echo -n ' kerberos'; kerberos >> /var/log/kerberos.log &
fi
echo '.'
#-----------------------------------------------------
# check for correct driver and driver version matching
#-----------------------------------------------------
if [ -x /usr/sbin/ispcvt ]
then
if /usr/sbin/ispcvt
then
#--------------------------------------------------
# loading fonts into vga
#--------------------------------------------------
echo 'console driver type: pcvt'
if [ -x /usr/sbin/loadfont -a -x /usr/sbin/scon ]
then
adaptor=`/usr/sbin/scon -a`
if [ $adaptor = VGA ]
then
echo 'loading 25 lines base font into character set 0'
/usr/sbin/loadfont -c0 -f/usr/share/misc/pcvtfonts/vt220l.816
echo 'loading 25 lines extension font into character set 1'
/usr/sbin/loadfont -c1 -f/usr/share/misc/pcvtfonts/vt220h.816
echo 'loading 28 lines base font into character set 2'
/usr/sbin/loadfont -c2 -f/usr/share/misc/pcvtfonts/vt220l.814
echo 'loading 28 lines extension font into character set 3'
/usr/sbin/loadfont -c3 -f/usr/share/misc/pcvtfonts/vt220h.814
echo 'loading 40 lines base font into character set 4'
/usr/sbin/loadfont -c4 -f/usr/share/misc/pcvtfonts/vt220l.810
echo 'loading 40 lines extension font into character set 5'
/usr/sbin/loadfont -c5 -f/usr/share/misc/pcvtfonts/vt220h.810
echo 'loading 50 lines base font into character set 6'
/usr/sbin/loadfont -c6 -f/usr/share/misc/pcvtfonts/vt220l.808
echo 'loading 50 lines extension font into character set 7'
/usr/sbin/loadfont -c7 -f/usr/share/misc/pcvtfonts/vt220h.808
elif [ $adaptor = EGA ]
then
echo 'loading 25 lines base font into character set 0'
/usr/sbin/loadfont -c0 -f/usr/share/misc/pcvtfonts/vt220l.814
echo 'loading 25 lines extension font into character set 1'
/usr/sbin/loadfont -c1 -f/usr/share/misc/pcvtfonts/vt220h.814
echo 'loading 35 lines base font into character set 2'
/usr/sbin/loadfont -c2 -f/usr/share/misc/pcvtfonts/vt220l.810
echo 'loading 35 lines extension font into character set 3'
/usr/sbin/loadfont -c3 -f/usr/share/misc/pcvtfonts/vt220h.810
# echo 'loading 43 lines base font into character set 2'
# /usr/sbin/loadfont -c2 -f/usr/share/misc/pcvtfonts/vt220l.808
# echo 'loading 43 lines extension font into character set 3'
# /usr/sbin/loadfont -c3 -f/usr/share/misc/pcvtfonts/vt220h.808
fi
fi
#--------------------------------------------------
# setting screen sizes and emulation
#--------------------------------------------------
if [ -x /usr/sbin/scon ]
then
if [ $adaptor = VGA ]
then
size=-s28
echo 'switching to 28 lines and VT/HP-emulation'
elif [ $adaptor = EGA ]
then
size=-s25
echo 'switching to 25 lines and VT/HP-emulation'
else
size=
echo 'switching to VT/HP-emulation'
fi
# get monitor type (mono/color)
monitor=`/usr/sbin/scon -m`
# for all screens do
for device in /dev/ttyv*
do
# setup HP mode
/usr/sbin/scon -d$device $size -H
# setup cursor size
if [ X${set_cursor} = X"YES" -a -x /usr/sbin/cursor ]
then
/usr/sbin/cursor -d$device -s$set_cur_start -e$set_cur_end
fi
# if monochrome monitor, set color palette to use a higher intensity
if [ $monitor = MONO ]
then
if [ $adaptor = VGA ]
then
/usr/sbin/scon -d$device -p8,60,60,60
fi
fi
done
# switch to screen 0
/usr/sbin/scon -c0
# set screensaver timeout to one minute
/usr/sbin/scon -t360
fi
#------------------------------------------------------
# if desired, setup keyboard for german keyboard layout
#------------------------------------------------------
if [ X${set_keybd} = X"YES" -a -x /usr/sbin/kcon ]
then
echo 'switching to german keyboard layout'
/usr/sbin/kcon -m de
fi
#------------------------------------------------------
# if desired, setup rate and delay keyboard values
#------------------------------------------------------
if [ X${set_keydr} = X"YES" -a -x /usr/sbin/kcon ]
then
echo setting keyboard typematic rate = $set_keydr_rate and delay = $set_keydr_delay
/usr/sbin/kcon -r $set_keydr_rate -d $set_keydr_delay
fi
#--------------------------------------------------
# if desired, start xdm on screen 8
#--------------------------------------------------
if [ X${xdm_start} = X"YES" -a -x /usr/X386/bin/xdm ]
then
/usr/sbin/scon -c 7
/usr/X386/bin/xdm
sleep 5
/usr/sbin/scon -c 0
fi
#--------------------------------------------------
# cp /etc/ttys corresponding to console driver
#--------------------------------------------------
if [ -f /etc/ttys.pcvt ]
then
echo 'copying /etc/ttys.pcvt -> /etc/ttys'
cp /etc/ttys.pcvt /etc/ttys
fi
else
echo 'console driver type: not pcvt or pcvt utility/driver mismatch:'
echo '--------------------------------------------------------------'
/usr/sbin/ispcvt -v
echo '--------------------------------------------------------------'
if [ -f /etc/ttys.pccons ]
then
echo 'copying /etc/ttys.pccons -> /etc/ttys'
cp /etc/ttys.pccons /etc/ttys
fi
fi
else
echo 'console driver type: not pcvt'
if [ -f /etc/ttys.pccons ]
then
echo 'copying /etc/ttys.pccons -> /etc/ttys'
cp /etc/ttys.pccons /etc/ttys
fi
fi
echo
# EOF ----------------------------------------------------------------------
|