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