1#!/bin/sh
2#
3# This script creates the proper /dev/ entries for IDE devices
4# on the primary, secondary, tertiary, and quaternary interfaces.
5# See ../Documentation/ide.txt for more information.
6#
7makedev () {
8	rm -f /dev/$1
9	echo mknod /dev/$1 $2 $3 $4
10	     mknod /dev/$1 $2 $3 $4
11	chown root:disk /dev/$1
12	chmod 660 /dev/$1
13}
14
15makedevs () {
16	rm -f /dev/$1*
17	makedev $1 b $2 $3
18	for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
19	do
20		makedev $1$part b $2 `expr $3 + $part`
21	done
22}
23
24makedevs hda  3 0
25makedevs hdb  3 64
26makedevs hdc 22 0
27makedevs hdd 22 64
28makedevs hde 33 0
29makedevs hdf 33 64
30makedevs hdg 34 0
31makedevs hdh 34 64
32makedevs hdi 56 0
33makedevs hdj 56 64
34makedevs hdk 57 0
35makedevs hdl 57 64
36makedevs hdm 88 0
37makedevs hdn 88 64
38makedevs hdo 89 0
39makedevs hdp 89 64
40makedevs hdq 90 0
41makedevs hdr 90 64
42makedevs hds 91 0
43makedevs hdt 91 64
44
45for tape in 0 1 2 3 4 5 6 7
46do
47	makedev ht$tape c 37 $tape
48	makedev nht$tape c 37 `expr $tape + 128`
49done
50