home *** CD-ROM | disk | FTP | other *** search
/ ftp.mayn.de / ftp.mayn.de-pub.zip / ftp.mayn.de-pub / apple / apple_unix / Sys_stuff / devscsi < prev    next >
Text File  |  2017-03-06  |  2KB  |  91 lines

  1. #!/bin/sh
  2. #
  3. #    init devscsi
  4. #
  5. #       @(#)Copyright Apple Computer 1987-91
  6. #       Version 1.5 of devscsi on 93/01/15 16:50:41
  7. #
  8. # Build the /dev/scsi devices based upon minor number passed in via autoconfig.
  9. #
  10.  
  11. PATH=/bin:/usr/bin:/etc:/usr/etc
  12.  
  13. name=devscsi
  14. devdir=/dev/scsi
  15.  
  16. #
  17. #       Parse "-k kernelfile" flag
  18. #
  19.  
  20. KERNEL=""
  21. if [ "$1" = "-k" ]; then
  22.     shift
  23.     KERNEL=$1
  24.     shift
  25. fi;
  26.  
  27. if [ "$1" = "-M" ]; then
  28.     if [ -d "$devdir" ]; then
  29.         /bin/rm -f $devdir/? $devdir/[1-4]0[0-6]
  30.     else
  31.         /bin/mkdir $devdir
  32.         /bin/chmod 755 $devdir
  33.     fi
  34.     cd $devdir
  35.  
  36.  
  37. #   devscsi minor device number  bus 1 : 0x10 - 0x16 or 16 - 22
  38. #                                bus 2 : 0x20 - 0x26 or 32 - 38
  39. #                                bus 3 : 0x30 - 0x36 or 48 - 54
  40. #                                bus 4 : 0x40 - 0x46 or 64 - 70
  41. #   old minor device number 0 - 7
  42. #
  43.     /etc/mknod 0 c $2 0
  44.     /etc/mknod 1 c $2 1
  45.     /etc/mknod 2 c $2 2
  46.     /etc/mknod 3 c $2 3
  47.     /etc/mknod 4 c $2 4
  48.     /etc/mknod 5 c $2 5
  49.     /etc/mknod 6 c $2 6
  50.  
  51. #bus 1
  52.     /etc/mknod 100 c $2 16
  53.     /etc/mknod 101 c $2 17
  54.     /etc/mknod 102 c $2 18
  55.     /etc/mknod 103 c $2 19
  56.     /etc/mknod 104 c $2 20
  57.     /etc/mknod 105 c $2 21
  58.     /etc/mknod 106 c $2 22
  59.  
  60. #bus 2
  61.     /etc/mknod 200 c $2 32
  62.     /etc/mknod 201 c $2 33
  63.     /etc/mknod 202 c $2 34
  64.     /etc/mknod 203 c $2 35
  65.     /etc/mknod 204 c $2 36
  66.     /etc/mknod 205 c $2 37
  67.     /etc/mknod 206 c $2 38
  68.  
  69. #bus 3
  70.     /etc/mknod 300 c $2 48
  71.     /etc/mknod 301 c $2 49
  72.     /etc/mknod 302 c $2 50
  73.     /etc/mknod 303 c $2 51
  74.     /etc/mknod 304 c $2 52
  75.     /etc/mknod 305 c $2 53
  76.     /etc/mknod 306 c $2 54
  77.  
  78. #bus 4
  79.     /etc/mknod 400 c $2 64
  80.     /etc/mknod 401 c $2 65
  81.     /etc/mknod 402 c $2 66
  82.     /etc/mknod 403 c $2 67
  83.     /etc/mknod 404 c $2 68
  84.     /etc/mknod 405 c $2 69
  85.     /etc/mknod 406 c $2 70
  86.  
  87.     /bin/chmod 600 [0-6]
  88.     /bin/chmod 600 [1-4]0[0-6]
  89. fi
  90.