etc/services - sync with NetBSD-8
[minix.git] / etc / devmand / scripts / block
blobcd16851cf22ef9ec9ec62f35c4dda7fab2c25fb2
1 #!/bin/sh
3 DEVSUFFIXES="p0 p0s0 p0s1 p0s2 p0s3 p1 p1s0 p1s1 p1s2 p1s3 p2 p2s0 p2s1 p2s2 p2s3 p3 p3s0 p3s1 p3s2 p3s3"
5 if [ "$1" = up ];
6 then
7 mknod /dev/$2 b $3 0;
8 mknod /dev/$2p0 b $3 1;
9 mknod /dev/$2p1 b $3 2;
10 mknod /dev/$2p2 b $3 3;
11 mknod /dev/$2p3 b $3 4;
12 mknod /dev/$2p0s0 b $3 128;
13 mknod /dev/$2p0s1 b $3 129;
14 mknod /dev/$2p0s2 b $3 130;
15 mknod /dev/$2p0s3 b $3 131;
16 mknod /dev/$2p1s0 b $3 132;
17 mknod /dev/$2p1s1 b $3 133;
18 mknod /dev/$2p1s2 b $3 134;
19 mknod /dev/$2p1s3 b $3 135;
20 mknod /dev/$2p2s0 b $3 136;
21 mknod /dev/$2p2s1 b $3 137;
22 mknod /dev/$2p2s2 b $3 138;
23 mknod /dev/$2p2s3 b $3 139;
24 mknod /dev/$2p3s0 b $3 140;
25 mknod /dev/$2p3s1 b $3 141;
26 mknod /dev/$2p3s2 b $3 142;
27 mknod /dev/$2p3s3 b $3 143;
28 echo New USB disk at /dev/$2.
29 elif [ "$1" = down ];
30 then
31 rm /dev/$2;
32 count=1;
33 for SUF in `echo $DEVSUFFIXES`;
34 do
35 rm /dev/${2}${SUF};
36 count=$(($count+1));
37 done
38 elif
39 [ "$1" = clean ];
40 then
41 rm -f /dev/$2*;