Commit | Line | Data |
---|---|---|
25767e9e RG |
1 | #!/bin/sh - |
2 | # | |
3 | # Copyright (c) 1990 The Regents of the University of California. | |
4 | # All rights reserved. | |
5 | # | |
6 | # Written and contributed by W. Jolitz 12/90 | |
7 | # | |
8 | # Redistribution and use in source and binary forms are permitted provided | |
9 | # that: (1) source distributions retain this entire copyright notice and | |
10 | # comment, and (2) distributions including binaries display the following | |
11 | # acknowledgement: ``This product includes software developed by the | |
12 | # University of California, Berkeley and its contributors'' in the | |
13 | # documentation or other materials provided with the distribution and in | |
14 | # all advertising materials mentioning features or use of this software. | |
15 | # Neither the name of the University nor the names of its contributors may | |
16 | # be used to endorse or promote products derived from this software without | |
17 | # specific prior written permission. | |
18 | # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED | |
19 | # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF | |
20 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
21 | # | |
22 | # @(#)MAKEDEV 5.2 (Berkeley) 6/22/90 | |
23 | # | |
24 | # Device "make" file. Valid arguments: | |
b51cbe37 | 25 | # all makes all known devices, standard number of units (or close) |
25767e9e RG |
26 | # std standard devices |
27 | # local configuration specific devices | |
28 | # | |
29 | # Tapes: | |
30 | # wt* QIC-interfaced (e.g. not SCSI) 3M cartridge tape | |
b51cbe37 RG |
31 | # st* "NEW type scsi tapes" (old driver uses the |
32 | # block devices of the disks to get access) | |
25767e9e RG |
33 | # |
34 | # Disks: | |
35 | # wd* "winchester" disk drives (ST506,IDE,ESDI,RLL,...) | |
36 | # fd* "floppy" disk drives (3 1/2", 5 1/4") | |
19ab8f72 RG |
37 | # sd* "scsi disks" |
38 | # cd* "cdrom disks" | |
25767e9e | 39 | # |
b51cbe37 | 40 | # Console ports: |
475c422d JH |
41 | # pc* devices for stock pccons |
42 | # vty* virtual console devices for syscons/pcvt/codrv | |
b51cbe37 | 43 | # |
e336f8ba NW |
44 | # Pointing devices: |
45 | # mse* Logitech and ATI Inport bus mouse | |
46 | # psm* PS/2 mouse | |
47 | # | |
25767e9e | 48 | # Terminal ports: |
61a5db5a RG |
49 | # sio* fast interrupt PC COM ports (really makes tty* entries for sio) |
50 | # tty* alias for sio ports, this is what the system really wants | |
ad288a16 GW |
51 | # com* standard PC COM ports (really makes tty* entries for com) |
52 | # Note that the `com' driver is not configured in the | |
53 | # supplied kernels and is usually not what you want. In | |
54 | # a future release it may be completely desupported. Fair | |
55 | # warning. | |
25767e9e RG |
56 | # |
57 | # Pseudo terminals: | |
58 | # pty* set of 16 master and slave pseudo terminals | |
475c422d | 59 | # vty* virtual terminals using syscons/pcvt/codrv console |
25767e9e RG |
60 | # |
61 | # Printers: | |
b51cbe37 RG |
62 | # lpt* stock lp |
63 | # lpa* interruptless lp | |
25767e9e RG |
64 | # |
65 | # Call units: | |
66 | # | |
67 | # Special purpose devices: | |
b51cbe37 RG |
68 | # bpf* packet filter |
69 | # dcf* dcf clock | |
70 | # speaker pc speaker | |
71 | # tw* xten power controller | |
82571c5f | 72 | # snd* various sound cards |
b51cbe37 | 73 | # |
3aace13b | 74 | # $Id: MAKEDEV,v 1.22 1994/01/10 18:11:30 ache Exp $ |
25767e9e RG |
75 | # |
76 | ||
b51cbe37 | 77 | PATH=/sbin:/bin/:/usr/bin:/usr/sbin: |
25767e9e RG |
78 | umask 77 |
79 | for i | |
80 | do | |
81 | case $i in | |
82 | ||
b51cbe37 RG |
83 | all) |
84 | sh MAKEDEV std # standard | |
bb174bd7 | 85 | sh MAKEDEV wd0 wd1 fd0 fd1 wt0 sd0 sd1 st0 cd0 # bdev |
b51cbe37 | 86 | sh MAKEDEV pty0 tty0 tty1 tty2 tty3 pc0 lpt0 lpt1 lpt2 # cdev |
bb174bd7 | 87 | sh MAKEDEV ch0 tw0 bpf0 dcf0 lpa0 lpa1 lpa2 # cdev |
b51cbe37 | 88 | sh MAKEDEV speaker mse0 sio0 sio1 sio2 sio3 # cdev |
e336f8ba NW |
89 | # NOTE: co0 and vty04 are not done by a "sh MAKEDEV all" |
90 | # these are for codrv and interfere with other devices! - rgrimes | |
b51cbe37 | 91 | ;; |
25767e9e | 92 | std) |
f2b1fb8b | 93 | rm -f console drum mem kmem null zero io tty klog stdin stdout stderr |
b51cbe37 RG |
94 | mknod console c 0 0; chmod 600 console; chown root.wheel console |
95 | mknod drum c 4 0; chmod 640 drum; chown root.kmem drum | |
96 | mknod kmem c 2 1; chmod 640 kmem; chown root.kmem kmem | |
97 | mknod mem c 2 0; chmod 640 mem; chown root.kmem mem | |
98 | mknod null c 2 2; chmod 666 null; chown root.wheel null | |
26f98db6 RG |
99 | mknod zero c 2 12; chmod 666 zero; chown root.wheel zero |
100 | mknod io c 2 14; chmod 640 io; chown root.kmem io | |
b51cbe37 RG |
101 | mknod tty c 1 0; chmod 666 tty; chown root.wheel tty |
102 | mknod klog c 7 0; chmod 600 klog; chown root.wheel klog | |
103 | mknod stdin c 22 0; chmod 666 stdin; chown root.wheel stdin | |
104 | mknod stdout c 22 1; chmod 666 stdout; chown root.wheel stdout | |
105 | mknod stderr c 22 2; chmod 666 stderr; chown root.wheel stderr | |
25767e9e RG |
106 | rm -f fd/* |
107 | mkdir fd > /dev/null 2>&1 | |
108 | (cd fd && eval `echo "" | awk ' BEGIN { \ | |
109 | for (i = 0; i < 64; i++) \ | |
b51cbe37 | 110 | printf("mknod %d c 22 %d;", i, i)}'`) |
25767e9e RG |
111 | chown -R bin.bin fd |
112 | chmod 555 fd | |
113 | chmod 666 fd/* | |
114 | ;; | |
115 | ||
19ab8f72 RG |
116 | |
117 | # Create device files for new Archive/Wangtek QIC-02 tape driver (vak) | |
25767e9e | 118 | wt*) |
19ab8f72 RG |
119 | umask 2 ; u=`expr $i : '..\(.*\)'` |
120 | if [ x$u = x ]; then u=0; fi | |
54aa8b54 | 121 | rm -f r[Ww]t$u nr[Ww]t$u r[Ww]t$u[a-f] nr[Ww]t$u[a-f] |
75a0a675 | 122 | mknod rwt${u} c 10 `expr 0 + $u` # default density, 512b blocks |
19ab8f72 | 123 | mknod nrwt${u} c 10 `expr 4 + $u` |
54aa8b54 AM |
124 | # mknod rWt${u} c 10 `expr 64 + $u` # default density, 1024b blocks |
125 | # mknod nrWt${u} c 10 `expr 68 + $u` | |
126 | mknod rwt${u}b c 10 `expr 16 + $u` # 60 megabytes | |
19ab8f72 | 127 | mknod nrwt${u}b c 10 `expr 20 + $u` |
54aa8b54 AM |
128 | mknod rwt${u}c c 10 `expr 24 + $u` # 120 megabytes |
129 | mknod nrwt${u}c c 10 `expr 28 + $u` | |
130 | mknod rwt${u}d c 10 `expr 32 + $u` # 150 megabytes | |
131 | mknod nrwt${u}d c 10 `expr 36 + $u` | |
132 | # mknod rwt${u}e c 10 `expr 40 + $u` # 300 megabytes? | |
133 | # mknod nrwt${u}e c 10 `expr 44 + $u` | |
134 | # mknod rwt${u}f c 10 `expr 48 + $u` # 600 megabytes? | |
135 | # mknod nrwt${u}f c 10 `expr 52 + $u` | |
136 | chown root.operator r[Ww]t$u nr[Ww]t$u r[Ww]t$u[a-f] nr[Ww]t$u[a-f] | |
137 | umask 77 | |
25767e9e RG |
138 | ;; |
139 | ||
1d4e5e31 AC |
140 | fd*) |
141 | umask 2 ; unit=`expr $i : '..\(.*\)'` | |
142 | name=fd; blk=2; chr=9; | |
143 | rm -f $name$unit* r$name$unit* | |
144 | case $unit in | |
145 | 0|1|2|3) | |
146 | mknod ${name}${unit} b $blk `expr $unit '*' 64` | |
147 | mknod r${name}${unit} c $chr `expr $unit '*' 64` | |
148 | # Fake BSD partitions | |
149 | for i in a b c d e f g h | |
150 | do | |
151 | ln ${name}${unit} ${name}${unit}$i | |
152 | ln r${name}${unit} r${name}${unit}$i | |
153 | done | |
7b7b4fd6 AC |
154 | # User-readable and programmer-readable name sets |
155 | ||
156 | mknod ${name}${unit}.1720 b $blk `expr $unit '*' 64 + 1` | |
157 | mknod r${name}${unit}.1720 c $chr `expr $unit '*' 64 + 1` | |
41be295e AC |
158 | # ln ${name}${unit}.1720 ${name}${unit}135hs21 |
159 | # ln r${name}${unit}.1720 r${name}${unit}135hs21 | |
7b7b4fd6 AC |
160 | |
161 | mknod ${name}${unit}.1480 b $blk `expr $unit '*' 64 + 2` | |
162 | mknod r${name}${unit}.1480 c $chr `expr $unit '*' 64 + 2` | |
41be295e AC |
163 | # ln ${name}${unit}.1480 ${name}${unit}135hs18 |
164 | # ln r${name}${unit}.1480 r${name}${unit}135hs18 | |
165 | # ln ${name}${unit}.1480 ${name}${unit}96hs18 | |
166 | # ln r${name}${unit}.1480 r${name}${unit}96hs18 | |
7b7b4fd6 AC |
167 | |
168 | mknod ${name}${unit}.1440 b $blk `expr $unit '*' 64 + 3` | |
169 | mknod r${name}${unit}.1440 c $chr `expr $unit '*' 64 + 3` | |
41be295e AC |
170 | # ln ${name}${unit}.1440 ${name}${unit}135 |
171 | # ln r${name}${unit}.1440 r${name}${unit}135 | |
172 | # ln ${name}${unit}.1440 ${name}${unit}135ds18 | |
173 | # ln r${name}${unit}.1440 r${name}${unit}135ds18 | |
174 | # ln ${name}${unit}.1440 ${name}${unit}96ds18 | |
175 | # ln r${name}${unit}.1440 r${name}${unit}96ds18 | |
7b7b4fd6 AC |
176 | |
177 | mknod ${name}${unit}.1200 b $blk `expr $unit '*' 64 + 4` | |
178 | mknod r${name}${unit}.1200 c $chr `expr $unit '*' 64 + 4` | |
41be295e AC |
179 | # ln ${name}${unit}.1200 ${name}${unit}96 |
180 | # ln r${name}${unit}.1200 r${name}${unit}96 | |
181 | # ln ${name}${unit}.1200 ${name}${unit}96ds15 | |
182 | # ln r${name}${unit}.1200 r${name}${unit}96ds15 | |
183 | # ln ${name}${unit}.1200 ${name}${unit}135ds15 | |
184 | # ln r${name}${unit}.1200 r${name}${unit}135ds15 | |
7b7b4fd6 AC |
185 | |
186 | mknod ${name}${unit}.820 b $blk `expr $unit '*' 64 + 5` | |
187 | mknod r${name}${unit}.820 c $chr `expr $unit '*' 64 + 5` | |
41be295e AC |
188 | # ln ${name}${unit}.820 ${name}${unit}96hs10 |
189 | # ln r${name}${unit}.820 r${name}${unit}96hs10 | |
190 | # ln ${name}${unit}.820 ${name}${unit}135hs10 | |
191 | # ln r${name}${unit}.820 r${name}${unit}135hs10 | |
7b7b4fd6 AC |
192 | |
193 | mknod ${name}${unit}.800 b $blk `expr $unit '*' 64 + 6` | |
194 | mknod r${name}${unit}.800 c $chr `expr $unit '*' 64 + 6` | |
41be295e AC |
195 | # ln ${name}${unit}.800 ${name}${unit}96ds10 |
196 | # ln r${name}${unit}.800 r${name}${unit}96ds10 | |
197 | # ln ${name}${unit}.800 ${name}${unit}135ds10 | |
198 | # ln r${name}${unit}.800 r${name}${unit}135ds10 | |
7b7b4fd6 AC |
199 | |
200 | mknod ${name}${unit}.720 b $blk `expr $unit '*' 64 + 7` | |
201 | mknod r${name}${unit}.720 c $chr `expr $unit '*' 64 + 7` | |
41be295e AC |
202 | # ln ${name}${unit}.720 ${name}${unit}96ds9 |
203 | # ln r${name}${unit}.720 r${name}${unit}96ds9 | |
204 | # ln ${name}${unit}.720 ${name}${unit}135ds9 | |
205 | # ln r${name}${unit}.720 r${name}${unit}135ds9 | |
7b7b4fd6 AC |
206 | |
207 | mknod ${name}${unit}.360 b $blk `expr $unit '*' 64 + 8` | |
208 | mknod r${name}${unit}.360 c $chr `expr $unit '*' 64 + 8` | |
41be295e AC |
209 | # ln ${name}${unit}.360 ${name}${unit}48 |
210 | # ln r${name}${unit}.360 r${name}${unit}48 | |
211 | # ln ${name}${unit}.360 ${name}${unit}48ds9 | |
212 | # ln r${name}${unit}.360 r${name}${unit}48ds9 | |
7b7b4fd6 AC |
213 | |
214 | chgrp operator ${name}${unit}* r${name}${unit}* | |
215 | chmod 640 ${name}${unit}* r${name}${unit}* | |
1d4e5e31 AC |
216 | ;; |
217 | *) | |
218 | echo bad unit for disk in: $i | |
219 | ;; | |
220 | esac | |
221 | umask 77 | |
222 | ;; | |
223 | ||
224 | sd*|wd*) | |
25767e9e RG |
225 | umask 2 ; unit=`expr $i : '..\(.*\)'` |
226 | case $i in | |
b51cbe37 | 227 | sd*) name=sd; blk=4; chr=13;; |
25767e9e | 228 | wd*) name=wd; blk=0; chr=3;; |
25767e9e RG |
229 | esac |
230 | rm -f $name$unit? r$name$unit? | |
231 | case $unit in | |
b51cbe37 | 232 | 0|1|2|3|4|5|6) |
25767e9e RG |
233 | mknod ${name}${unit}a b $blk `expr $unit '*' 8 + 0` |
234 | mknod ${name}${unit}b b $blk `expr $unit '*' 8 + 1` | |
235 | mknod ${name}${unit}c b $blk `expr $unit '*' 8 + 2` | |
236 | mknod ${name}${unit}d b $blk `expr $unit '*' 8 + 3` | |
237 | mknod ${name}${unit}e b $blk `expr $unit '*' 8 + 4` | |
238 | mknod ${name}${unit}f b $blk `expr $unit '*' 8 + 5` | |
239 | mknod ${name}${unit}g b $blk `expr $unit '*' 8 + 6` | |
240 | mknod ${name}${unit}h b $blk `expr $unit '*' 8 + 7` | |
241 | mknod r${name}${unit}a c $chr `expr $unit '*' 8 + 0` | |
242 | mknod r${name}${unit}b c $chr `expr $unit '*' 8 + 1` | |
243 | mknod r${name}${unit}c c $chr `expr $unit '*' 8 + 2` | |
244 | mknod r${name}${unit}d c $chr `expr $unit '*' 8 + 3` | |
245 | mknod r${name}${unit}e c $chr `expr $unit '*' 8 + 4` | |
246 | mknod r${name}${unit}f c $chr `expr $unit '*' 8 + 5` | |
247 | mknod r${name}${unit}g c $chr `expr $unit '*' 8 + 6` | |
248 | mknod r${name}${unit}h c $chr `expr $unit '*' 8 + 7` | |
249 | chgrp operator ${name}${unit}[a-h] r${name}${unit}[a-h] | |
250 | chmod 640 ${name}${unit}[a-h] r${name}${unit}[a-h] | |
251 | ;; | |
252 | *) | |
253 | echo bad unit for disk in: $i | |
254 | ;; | |
255 | esac | |
256 | umask 77 | |
257 | ;; | |
258 | ||
6bcdd668 RG |
259 | uk*) |
260 | unit=`expr $i : 'uk\(.*\)'` | |
261 | rm -f uk$unit | |
262 | mknod uk$unit c 27 $unit | |
263 | ;; | |
264 | ||
61a5db5a | 265 | com*) |
b51cbe37 | 266 | unit=`expr $i : '...\(.*\)'` |
61a5db5a | 267 | rm -f tty0$unit |
b51cbe37 | 268 | mknod tty0$unit c 8 $unit |
61a5db5a | 269 | chown uucp.wheel tty0$unit |
25767e9e RG |
270 | ;; |
271 | ||
272 | pty*) | |
273 | class=`expr $i : 'pty\(.*\)'` | |
274 | case $class in | |
275 | 0) offset=0 name=p;; | |
276 | 1) offset=16 name=q;; | |
277 | 2) offset=32 name=r;; | |
278 | 3) offset=48 name=s;; | |
279 | # Note that telnetd, rlogind, and xterm (at least) only look at p-s. | |
280 | 4) offset=64 name=t;; | |
281 | *) echo bad unit for pty in: $i;; | |
282 | esac | |
283 | case $class in | |
284 | 0|1|2|3|4) | |
285 | umask 0 | |
286 | eval `echo $offset $name | awk ' { b=$1; n=$2 } END { | |
287 | for (i = 0; i < 16; i++) | |
b51cbe37 RG |
288 | printf("rm -f tty%s%x; mknod tty%s%x c 5 %d; \ |
289 | rm -f pty%s%x; mknod pty%s%x c 6 %d; ", \ | |
290 | n, i, n, i, b+i, n, i, n, i, b+i); }'` | |
25767e9e | 291 | umask 77 |
25767e9e RG |
292 | ;; |
293 | esac | |
294 | ;; | |
295 | ||
b51cbe37 RG |
296 | st*) |
297 | umask 2 ; unit=`expr $i : '..\(.*\)'` | |
6bcdd668 RG |
298 | chr=14; |
299 | ||
300 | #remove old stype names | |
301 | rm -f [hml]rst[0123456] [hml][en]rst[0123456] [hml]enrst[0123456] | |
302 | #remove new style names | |
303 | rm -f rst${unit} [en]rst${unit} enrst${unit} | |
304 | rm -f rst${unit}.[0123] nrst${unit}.[0123]\ | |
305 | erst${unit}.[0123] st${unit}ctl.[0123] | |
306 | ||
b51cbe37 RG |
307 | case $unit in |
308 | 0|1|2|3|4|5|6) | |
6bcdd668 RG |
309 | for mode in 0 1 2 3 |
310 | do | |
311 | mknod rst${unit}.${mode} c $chr `expr $unit '*' 16 + $mode '*' 4 + 0` | |
312 | mknod nrst${unit}.${mode} c $chr `expr $unit '*' 16 + $mode '*' 4 + 1` | |
313 | mknod erst${unit}.${mode} c $chr `expr $unit '*' 16 + $mode '*' 4 + 2` | |
314 | mknod st${unit}ctl.${mode} c $chr `expr $unit '*' 16 + $mode '*' 4 + 3` | |
315 | chgrp operator rst${unit}.${mode}\ | |
316 | nrst${unit}.${mode} \ | |
317 | erst${unit}.${mode} \ | |
318 | st${unit}ctl.${mode} | |
319 | chmod 644 rst${unit}.${mode}\ | |
320 | nrst${unit}.${mode} \ | |
321 | erst${unit}.${mode} | |
322 | chmod 660 st${unit}ctl.${mode} | |
323 | done | |
324 | ln rst${unit}.0 rst${unit} | |
325 | ln nrst${unit}.0 nrst${unit} | |
326 | ln erst${unit}.0 erst${unit} | |
b51cbe37 RG |
327 | ;; |
328 | *) | |
329 | echo bad unit for tape in: $i | |
6bcdd668 RG |
330 | ;; |
331 | esac | |
332 | umask 77 | |
b51cbe37 RG |
333 | ;; |
334 | ||
335 | ch*) | |
336 | umask 2 ; unit=`expr $i : '..\(.*\)'` | |
337 | case $i in | |
338 | ch*) name=ch; chr=17;; | |
339 | esac | |
340 | rm -f $name$unit | |
341 | case $unit in | |
342 | 0|1|2|3|4|5|6) | |
343 | mknod ${name}${unit} c $chr `expr $unit '*' 16 + 0` | |
344 | chgrp operator ${name}${unit} | |
345 | chmod 640 ${name}${unit} | |
346 | ;; | |
347 | *) | |
348 | echo bad unit for media changer in: $i | |
349 | ;; | |
350 | esac | |
351 | umask 77 | |
352 | ;; | |
353 | ||
354 | cd*) | |
355 | umask 2 ; unit=`expr $i : '..\(.*\)'` | |
356 | case $i in | |
357 | cd*) name=cd; blk=6; chr=15;; | |
358 | esac | |
359 | rm -f $name$unit? r$name$unit? | |
360 | case $unit in | |
361 | 0|1|2|3|4|5|6) | |
362 | mknod ${name}${unit}a b $blk `expr $unit '*' 8 + 0` | |
363 | mknod ${name}${unit}d b $blk `expr $unit '*' 8 + 3` | |
364 | mknod r${name}${unit}a c $chr `expr $unit '*' 8 + 0` | |
365 | mknod r${name}${unit}d c $chr `expr $unit '*' 8 + 3` | |
366 | chgrp operator ${name}${unit}[a-h] r${name}${unit}[a-h] | |
367 | chmod 640 ${name}${unit}[a-h] r${name}${unit}[a-h] | |
368 | ;; | |
369 | *) | |
370 | echo bad unit for disk in: $i | |
371 | ;; | |
372 | esac | |
373 | umask 77 | |
374 | ;; | |
375 | ||
376 | lpt*) | |
377 | unit=`expr $i : 'lpt\(.*\)'` | |
378 | rm -f lpt$unit | |
379 | mknod lpt$unit c 16 $unit | |
380 | chown root.wheel lpt$unit | |
381 | ;; | |
382 | ||
383 | tw*) | |
384 | unit=`expr $i : 'tw\(.*\)'` | |
385 | rm -f tw$unit | |
386 | mknod tw$unit c 19 $unit | |
387 | chown root.wheel tw$unit | |
388 | ;; | |
389 | ||
b51cbe37 RG |
390 | # hv 22-apr-93 use this to create the necessary video device for |
391 | # pccons driver | |
392 | pc*) | |
393 | chr=12 | |
394 | minor=0 | |
3aace13b DG |
395 | name=ttyv0 |
396 | rm -f ${name} vga kbd kbdco vgaco ttyv[0-9][0-9] | |
b51cbe37 RG |
397 | mknod ${name} c ${chr} ${minor} |
398 | chown root.wheel $name | |
399 | ;; | |
400 | ||
475c422d | 401 | # Use this to create virtual consoles for syscons, pcvt or codrv |
150fc6d7 | 402 | # /dev/ttyv0-b |
b51cbe37 RG |
403 | # use as MAKEDEV vtyNN to create NN entries |
404 | vty*) | |
405 | chr=12 | |
406 | units=`expr $i : 'vty\(.*\)'` | |
407 | umask 0 | |
408 | eval `echo ${chr} ${units} | awk ' { c=$1; n=$2 } END { | |
409 | for (i = 0; i < n; i++) | |
410 | printf("rm -f ttyv%01x; mknod ttyv%01x c %d %d;", \ | |
411 | i, i, c, i); }'` | |
412 | umask 77 | |
413 | ;; | |
414 | ||
415 | bpf*) | |
416 | unit=`expr $i : 'bpf\(.*\)'` | |
417 | rm -f bpf$unit | |
418 | mknod bpf$unit c 23 $unit | |
419 | chown root.wheel bpf$unit | |
420 | ;; | |
421 | ||
422 | dcf*) | |
423 | unit=`expr $i : 'dcf\(.*\)'` | |
424 | rm -f dcf$unit | |
425 | mknod dcf$unit c 24 $unit | |
426 | chown root.wheel dcf$unit | |
427 | ;; | |
428 | ||
429 | lpa*) | |
430 | unit=`expr $i : 'lpa\(.*\)'` | |
431 | chr=25 | |
432 | rm -f lpa$unit lpa${unit}p | |
433 | mknod lpa${unit} c $chr `expr $unit + 0` | |
434 | mknod lpa${unit}p c $chr `expr $unit + 32` | |
435 | chown root.wheel lpa${unit} lpa${unit}p | |
436 | ;; | |
437 | ||
438 | speaker) | |
439 | rm -f speaker | |
440 | mknod speaker c 26 0 | |
441 | chown root.wheel speaker | |
442 | ;; | |
443 | ||
f02c1230 | 444 | sio*|tty*|cua*) |
b51cbe37 | 445 | unit=`expr $i : '...\(.*\)'` |
f02c1230 | 446 | rm -f tty0$unit cua0$unit |
61a5db5a | 447 | mknod tty0$unit c 28 $unit |
f02c1230 AC |
448 | mknod cua0$unit c 28 `expr $unit + 128` |
449 | chown uucp.wheel tty0$unit cua0$unit | |
b51cbe37 RG |
450 | ;; |
451 | ||
e336f8ba NW |
452 | mse*) |
453 | unit=`expr $i : 'mse\(.*\)'` | |
454 | chr=27 | |
455 | rm -f mse$unit | |
456 | mknod mse$unit c $chr `expr $unit '*' 2 + 1` # non-blocking for X11 | |
457 | chown root.wheel mse$unit | |
458 | ;; | |
459 | ||
460 | psm*) | |
461 | unit=`expr $i : 'psm\(.*\)'` | |
462 | chr=21 | |
463 | rm -f psm$unit | |
464 | mknod psm$unit c $chr `expr $unit '*' 2 + 1` # non-blocking for X11 | |
465 | chown root.wheel psm$unit | |
466 | ;; | |
467 | ||
468 | mouse*) | |
469 | name=`expr $i : 'mouse-\(.*\)'` | |
470 | if [ ! -c $name ]; then | |
471 | $0 $name # make the appropriate device | |
472 | fi | |
473 | rm -f mouse | |
474 | ln -s $name mouse | |
475 | ;; | |
476 | ||
82571c5f JH |
477 | |
478 | snd*) | |
94eab694 | 479 | chr=30 |
82571c5f | 480 | rm -f /dev/mixer # Mixer [ Control ] |
94eab694 | 481 | mknod /dev/mixer c $chr 0 |
82571c5f JH |
482 | chmod 666 /dev/mixer |
483 | ||
484 | rm -f /dev/sequencer # Sequencer [ FM Synth and MIDI output ] | |
94eab694 | 485 | mknod /dev/sequencer c $chr 1 |
82571c5f JH |
486 | chmod 666 /dev/sequencer |
487 | ||
488 | rm -f /dev/midi # Midi input [ Not implemented ] | |
94eab694 | 489 | mknod /dev/midi c $chr 2 |
82571c5f JH |
490 | |
491 | rm -f /dev/dsp # DSP [ Digitized voice ] | |
94eab694 | 492 | mknod /dev/dsp c $chr 3 |
82571c5f JH |
493 | chmod 666 /dev/dsp |
494 | ||
495 | rm -f /dev/audio # SPARC audio [ Not fully implemented ] | |
94eab694 | 496 | mknod /dev/audio c $chr 4 |
82571c5f JH |
497 | chmod 666 /dev/audio |
498 | ||
499 | rm -f /dev/dsp16 # DSP16 [ Same as /dev/dsp, except 16 bits ] | |
94eab694 | 500 | mknod /dev/dsp16 c $chr 5 |
82571c5f JH |
501 | chmod 666 /dev/dsp16 |
502 | ||
503 | rm -f /dev/sndstat # Status Device [ Debugging interface ] | |
94eab694 | 504 | mknod /dev/sndstat c $chr 6 |
82571c5f JH |
505 | chmod 666 /dev/sndstat |
506 | ||
507 | rm -f /dev/pro_midi # PRO_MIDI [PAS midi input and output] | |
94eab694 | 508 | mknod /dev/pro_midi c $chr 15 |
82571c5f JH |
509 | chmod 666 /dev/pro_midi |
510 | ||
511 | rm -f /dev/dsp1 # DSP 1 [ SB emulation of PAS16 or 2nd audio ] | |
94eab694 | 512 | mknod /dev/dsp1 c $chr 19 |
82571c5f JH |
513 | chmod 666 /dev/dsp1 |
514 | ||
515 | rm -f /dev/audio1 # Sparc Audio 1 [ SB emulation of PAS16 or 2nd audio ] | |
94eab694 | 516 | mknod /dev/audio1 c $chr 20 |
82571c5f JH |
517 | chmod 666 /dev/audio1 |
518 | ;; | |
519 | ||
25767e9e RG |
520 | local) |
521 | umask 0 | |
522 | sh MAKEDEV.local | |
523 | ;; | |
524 | ||
525 | esac | |
526 | done |