[BACK]Return to MAKEDEV.tmpl CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / etc

Annotation of src/etc/MAKEDEV.tmpl, Revision 1.13

1.1       jdolecek    1: #!/bin/sh -
1.13    ! lukem       2: #      $NetBSD: MAKEDEV.tmpl,v 1.12 2003/12/15 08:57:52 jdolecek Exp $
1.1       jdolecek    3: #
                      4: # Copyright (c) 2003 The NetBSD Foundation, Inc.
                      5: # All rights reserved.
                      6: #
                      7: # Redistribution and use in source and binary forms, with or without
                      8: # modification, are permitted provided that the following conditions
                      9: # are met:
                     10: # 1. Redistributions of source code must retain the above copyright
                     11: #    notice, this list of conditions and the following disclaimer.
                     12: # 2. Redistributions in binary form must reproduce the above copyright
                     13: #    notice, this list of conditions and the following disclaimer in the
                     14: #    documentation and/or other materials provided with the distribution.
                     15: # 3. All advertising materials mentioning features or use of this software
                     16: #    must display the following acknowledgement:
                     17: #        This product includes software developed by the NetBSD
                     18: #        Foundation, Inc. and its contributors.
                     19: # 4. Neither the name of The NetBSD Foundation nor the names of its
                     20: #    contributors may be used to endorse or promote products derived
                     21: #    from this software without specific prior written permission.
                     22: #
                     23: # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
                     24: # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
                     25: # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
                     26: # PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
                     27: # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
                     28: # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
                     29: # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
                     30: # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
                     31: # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
                     32: # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
                     33: # POSSIBILITY OF SUCH DAMAGE.
                     34: #
                     35: #
                     36: ###########################################################################
                     37: #
                     38: #   PLEASE RUN "cd ../share/man/man8 ; make makedevs"
                     39: #   AFTER CHANGING THIS FILE, AND COMMIT THE UPDATED MANPAGE!
                     40: #
                     41: ###########################################################################
                     42: #
                     43: # Device "make" file.  Valid arguments:
                     44: #      all     makes all known devices, including local devices.
                     45: #              Tries to make the 'standard' number of each type.
                     46: #      init    A set of devices that is used for MFS /dev by init.
                     47: #              May be equal to "all".
                     48: #      floppy  devices to be put on install floppies
                     49: #      ramdisk devices to be put into INSTALL kernel ramdisks.
                     50: #      std     standard devices
                     51: #      local   configuration specific devices
                     52: #      usbs    make USB devices
                     53: #      isdns   make ISDN devices
                     54: #
                     55: # Tapes:
                     56: #      st*     SCSI tapes
                     57: #      wt*     QIC-interfaced (e.g. not SCSI) 3M cartridge tape
                     58: #      ht*     MASSBUS TM03 and TU??
                     59: #      mt*     MSCP tapes (e.g. TU81, TK50)
                     60: #      tm*     UNIBUS TM11 and TE10 emulations (e.g. Emulex TC-11)
                     61: #      ts*     UNIBUS TS11
                     62: #      ut*     UNIBUS TU45 emulations (e.g. si 9700)
                     63: #      uu*     TU58 cassettes on DL11 controller
                     64: #
                     65: # Disks:
                     66: #      ccd*    concatenated disk devices
                     67: #      cd*     SCSI or ATAPI CD-ROM
                     68: #      cgd*    cryptographic disk devices
                     69: #      raid*   RAIDframe disk devices
                     70: #      sd*     SCSI disks
                     71: #      wd*     "winchester" disk drives (ST506,IDE,ESDI,RLL,...)
                     72: #      bmd*    Nereid bank memory disks
                     73: #      ed*     IBM PS/2 ESDI disk devices
                     74: #      fd*     "floppy" disk drives (3 1/2", 5 1/4")
1.11      hannken    75: #      fss*    Files system snapshot devices
1.1       jdolecek   76: #      gdrom*  Dreamcast "gigadisc" CD-ROM drive
                     77: #      hk*     UNIBUS RK06 and RK07
                     78: #      hp*     MASSBUS RM??
                     79: #      ld*     Logical disk devices (e.g., hardware RAID)
                     80: #      mcd*    Mitsumi CD-ROM
                     81: #      md*     memory pseudo-disk devices
                     82: #      ofdisk* OpenFirmware disk devices
                     83: #      ra*     MSCP disks (RA??, RD??)
                     84: #      rb*     730 IDC w/ RB80 and/or RB02
                     85: #      rd*     HDC9224 RD disks on VS2000
                     86: #      rl*     UNIBUS RL02
                     87: #      rx*     MSCP floppy disk (RX33/50/...)
                     88: #      up*     other UNIBUS devices (e.g. on Emulex SC-21V controller)
                     89: #      vnd*    "file" pseudo-disks
                     90: #      xd*     Xylogic 753/7053 disks
                     91: #      xy*     Xylogic 450/451 disks
                     92: #
                     93: # Pointing devices:
                     94: #      wsmouse* wscons mouse events
                     95: #      lms*    Logitech bus mouse
                     96: #      mms*    Microsoft bus mouse
                     97: #      qms*    "quadrature mouse"
                     98: #      pms*    PS/2 mouse
                     99: #      mouse   mouse (provides events, for X11)
                    100: #
                    101: # Keyboard devices:
                    102: #      wskbd*  wscons keyboard events
                    103: #      kbd     raw keyboard (provides events, for X11)
                    104: #      kbdctl  keyboard control
                    105: #
                    106: # Terminals/Console ports:
                    107: #      tty[01]*        standard serial ports
                    108: #      tty0*   SB1250 ("sbscn") serial ports (sbmips)
                    109: #      ttyE*   wscons - Workstation console ("wscons") glass-tty emulators
                    110: #      ttyCZ?  Cyclades-Z multiport serial boards.  Each "unit"
                    111: #              makes 64 ports.
                    112: #      ttyCY?  Cyclom-Y multiport serial boards. Each "unit" makes
                    113: #              32 ports.
                    114: #      ttye*   ITE bitmapped consoles
                    115: #      ttyv0   pccons
                    116: #      ttyC?   NS16550 ("com") serial ports
                    117: #      ttyS*   SA1110 serial port (hpcarm)
                    118: #      ttyTX?  TX39 internal serial ports (hpcmips)
                    119: #      ttyB?   DEC 3000 ZS8530 ("scc") serial ports (alpha)
                    120: #      ttyA*   mfc serial ports (amiga)
                    121: #      ttyB*   msc serial ports (amiga)
                    122: #      ttyC*   com style serial ports (DraCo, HyperCom) (amiga)
                    123: #              On the DraCo, units 0 and 1 are the built-in "modem" and
                    124: #              "mouse" ports, if configured.
                    125: #      ttyA0   8530 Channel A (formerly ser02) (atari)
                    126: #      ttyA1   8530 Channel B (formerly mdm02) (atari)
                    127: #      ttyB0   UART on first 68901 (formerly mdm01) (atari)
                    128: #      ixpcom  IXP12x0 COM ports
1.9       tsutsui   129: #      ttyM?   HP200/300 4 port serial mux interface (hp300)
1.6       jdolecek  130: #      ttya    "ttya" system console (luna68k)
1.1       jdolecek  131: #      ttyb    second system serial port (luna68k)
                    132: #      tty*    Onboard serial ports (mvme68k)
                    133: #              On the mvme147 these are: ttyZ1, ttyZ2 and ttyZ3.
                    134: #              On the mvme167, and '177: ttyC1, ttyC2 and ttyC3.
                    135: #              Note that tty[CZ]0 is grabbed by the console device
                    136: #              so is not created by default
                    137: #      dc*     PMAX 4 channel serial interface (kbd, mouse, modem, printer)
                    138: #      scc*    82530 serial interface (pmax)
                    139: #      ttyZ*   Zilog 8530 ("zstty") serial ports
                    140: #      tty[abcd]       Built-in serial ports (sparc)
                    141: #      tty*    Z88530 serial controllers (sparc64)
                    142: #      ttyh*   SAB82532 serial controllers (sparc64)
                    143: #      tty[a-j]        Built-in serial ports (sun2, sun3)
                    144: #      ttyC?   pccons (arc)
                    145: #      dz*     UNIBUS DZ11 and DZ32 (vax)
                    146: #      dh*     UNIBUS DH11 and emulations (e.g. Able DMAX, Emulex CS-11) (vax)
                    147: #      dmf*    UNIBUS DMF32 (vax)
                    148: #      dhu*    UNIBUS DHU11 (vax)
                    149: #      dmz*    UNIBUS DMZ32 (vax)
                    150: #      dl*     UNIBUS DL11 (vax)
                    151: #
                    152: # Terminal multiplexors:
                    153: #      dc*     4 channel serial interface (keyboard, mouse, modem, printer)
                    154: #      dh*     UNIBUS DH11 and emulations (e.g. Able DMAX, Emulex CS-11)
                    155: #      dhu*    UNIBUS DHU11
                    156: #      dl*     UNIBUS DL11
                    157: #      dmf*    UNIBUS DMF32
                    158: #      dmz*    UNIBUS DMZ32
                    159: #      dz*     UNIBUS DZ11 and DZ32
                    160: #      scc*    82530 serial interface
                    161: #
                    162: # Call units:
                    163: #      dn*     UNIBUS DN11 and emulations (e.g. Able Quadracall)
                    164: #
                    165: # Pseudo terminals:
                    166: #      pty*    set of 62 master and slave pseudo terminals
                    167: #      opty    first 16 ptys, to save inodes on install media
                    168: #      ipty    first 2 ptys, for install media use only
                    169: #
                    170: # Printers:
                    171: #      arcpp*  Archimedes parallel port
                    172: #      lpt*    stock lp
                    173: #      lpa*    interruptless lp
                    174: #      par*    Amiga motherboard parallel port
                    175: #
                    176: # USB devices:
                    177: #      usb*    USB control devices
                    178: #      uhid*   USB generic HID devices
                    179: #      ulpt*   USB printer devices
                    180: #      ugen*   USB generic devices
                    181: #      urio*   USB Diamond Rio 500 devices
                    182: #      uscanner*       USB scanners
                    183: #      ttyU*   USB modems
                    184: #
                    185: # ISDN devices:
                    186: #      isdn    communication between userland isdnd and kernel
                    187: #      isdnctl control device
                    188: #      isdnbchan* raw b-channel access
                    189: #      isdntel*        telephony device
                    190: #      isdnteld*       telephony dialout device
                    191: #      isdntrc*        trace device
                    192: #
                    193: # Video devices:
                    194: #      bwtwo*  monochromatic frame buffer
                    195: #      cgtwo*  8-bit color frame buffer
                    196: #      cgthree*        8-bit color frame buffer
                    197: #      cgfour* 8-bit color frame buffer
                    198: #      cgsix*  accelerated 8-bit color frame buffer
                    199: #      cgeight*        24-bit color frame buffer
1.6       jdolecek  200: #      etvme   Tseng et-compatible cards on VME (atari)
1.1       jdolecek  201: #      ik*     UNIBUS interface to Ikonas frame buffer
1.6       jdolecek  202: #      leo     Circad Leonardo VME-bus true color (atari)
1.1       jdolecek  203: #      ps*     UNIBUS interface to Picture System 2
                    204: #      qv*     QVSS (MicroVAX) display
                    205: #      tcx*    accelerated 8/24-bit color frame buffer
                    206: #
                    207: # Maple bus devices:
                    208: #      maple   Maple bus control devices
                    209: #      mlcd*   Maple bus LCD devices
                    210: #      mmem*   Maple bus storage devices
                    211: #
                    212: # Special purpose devices:
                    213: #      ad*     UNIBUS interface to Data Translation A/D converter
                    214: #      agp*    AGP GART devices
                    215: #      altq    ALTQ control interface
                    216: #      apm     power management device
                    217: #      audio*  audio devices
                    218: #      beep    PC speaker
1.10      isaki     219: #      bell*   OPM bell device (x68k)
1.1       jdolecek  220: #      bktr    Brooktree 848/849/878/879 based TV cards
                    221: #      bpf*    packet filter
                    222: #      cfs*    Coda file system device
                    223: #      ch*     SCSI media changer
                    224: #      cir*    Consumer IR
                    225: #      clockctl clock control for non root users
                    226: #      crypto  hardware crypto access driver
                    227: #      dmoverio hardware-assisted data movers
                    228: #      dpt*    DPT/Adaptec EATA RAID management interface
                    229: #      dpti*   DPT/Adaptec I2O RAID management interface
1.6       jdolecek  230: #      fb*     PMAX generic framebuffer pseudo-device
1.1       jdolecek  231: #      fd      file descriptors
                    232: #      grf*    graphics frame buffer device
                    233: #      hil     HP300 HIL input devices
                    234: #      icp     ICP-Vortex/Intel RAID control interface
                    235: #      iic*    IIC bus device
                    236: #      iop*    I2O IOP control interface
                    237: #      ipl     IP Filter
                    238: #      irframe* IrDA physical frame
                    239: #      ite*    terminal emulator interface to HP300 graphics devices
                    240: #      joy*    joystick device
                    241: #      kttcp   kernel ttcp helper device
                    242: #      lkm     loadable kernel modules interface
                    243: #      magma*  Magma multiport serial/parallel cards
                    244: #      midi*   MIDI
                    245: #      mlx*    Mylex DAC960 control interface
                    246: #      mly*    Mylex AcceleRAID/eXtremeRAID control interface
                    247: #      np*     UNIBUS Ethernet co-processor interface, for downloading.
                    248: #      nsmb*   SMB requester
                    249: #      openfirm OpenFirmware accessor
                    250: #      pci*    PCI bus access devices
1.6       jdolecek  251: #      pf      PF packet filter (not in tree)
1.10      isaki     252: #      pow*    power management device (x68k)
1.1       jdolecek  253: #      px*     PixelStamp Xserver access
                    254: #      radio*  radio devices
1.8       jdolecek  255: #      random  Random number generator
1.6       jdolecek  256: #      rtc*    RealTimeClock
1.1       jdolecek  257: #      satlink* PlanetConnect satellite receiver driver
1.8       jdolecek  258: #      scsibus* SCSI busses
1.1       jdolecek  259: #      se*     SCSI Ethernet
                    260: #      ses*    SES/SAF-TE SCSI Devices
                    261: #      speaker PC speaker              (XXX - installed)
1.10      isaki     262: #      sram    battery backuped memory (x68k)
1.1       jdolecek  263: #      ss*     SCSI scanner
                    264: #      stic*   PixelStamp interface chip
                    265: #      sysmon  System Monitoring hardware
                    266: #      systrace syscall tracer
                    267: #      tun*    network tunnel driver
                    268: #      twe     3ware Escalade control interface
                    269: #      uk*     unknown SCSI device
                    270: #      veriexec verified executable fingerprint loader
                    271: #      vmegen* generic VME access
                    272: #      view*   generic interface to graphic displays (Amiga)
                    273: #      wsfont* console font control
                    274: #      wsmux*  wscons event multiplexor
                    275:
                    276: dialin=0
                    277: dialout=524288
                    278: callunit=262144
                    279:
                    280: # Keep /usr/etc so SunOS can find chown
1.12      jdolecek  281: PATH=/sbin:/usr/sbin:/bin:/usr/bin:/rescue:/usr/etc
1.1       jdolecek  282:
                    283: # only allow read&write for owner by default
                    284: umask 077
                    285:
                    286: # Check if we have fdesc mounted
                    287: if [ -d fd ]; then
                    288:         case "`df fd`" in
                    289:         *fdesc*) nofdesc=false;;
                    290:         *) nofdesc=true;;
                    291:         esac
                    292: else
                    293:         nofdesc=true
                    294: fi
                    295:
                    296: # called from makedev, with params
                    297: # mkdev name b/c major minor [mode] [group]
                    298: mkdev() {
                    299:        rm -f $1
                    300:        mknod $1 $2 $3 $4
                    301:        test -n "$5" && chmod $5 $1
                    302:        test -n "$6" && chgrp $6 $1
                    303: }
                    304:
                    305: makedev()
                    306: {
                    307:
                    308: for i
                    309: do
                    310:
                    311: case $i in
                    312:
                    313: %MD_DEVICES%
1.2       jdolecek  314:
                    315: all)
                    316:        makedev all_md
                    317:        makedev std fd pty0
                    318:        makedev ccd0 ccd1 ccd2 ccd3
                    319:        makedev cgd0 cgd1 cgd2 cgd3
1.11      hannken   320:        makedev fss0 fss1 fss2 fss3
1.2       jdolecek  321:        makedev md0 md1
                    322:        makedev raid0 raid1 raid2 raid3 raid4 raid5 raid6 raid7
                    323:        makedev vnd0 vnd1 vnd2 vnd3
                    324:        makedev bpf0 bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7
                    325:        makedev tun0 tun1 tun2 tun3
1.4       jdolecek  326:        makedev ipl crypto random systrace
1.2       jdolecek  327:        makedev lkm clockctl
                    328:        makedev local
                    329:        ;;
                    330:
                    331: init)
                    332:        # unless overridden by MD entry, this is equal to 'all'
                    333:        makedev all
                    334:        ;;
1.1       jdolecek  335:
                    336: %MI_DEVICES_BEGIN%
                    337: audio)
                    338:        makedev audio0 audio1 audio2 audio3
                    339:        ln -fs sound0 sound
                    340:        ln -fs audio0 audio
                    341:        ln -fs mixer0 mixer
                    342:        ln -fs audioctl0 audioctl
                    343:        ;;
                    344:
                    345: radio)
                    346:        makedev radio0 radio1
                    347:        ln -fs radio0 radio
                    348:        ;;
                    349:
                    350: ramdisk)
                    351:        makedev floppy md0
                    352:        ;;
                    353:
                    354: usbs)
                    355:        makedev usb usb0 usb1 usb2 usb3 usb4 usb5 usb6 usb7
                    356:        makedev uhid0 uhid1 uhid2 uhid3
                    357:        makedev ulpt0 ulpt1
                    358:        makedev ttyU0 ttyU1
                    359:        makedev urio0
                    360:        makedev uscanner0 uscanner1
                    361:        makedev ugen0
                    362:        ;;
                    363:
                    364: isdns)
                    365:        makedev isdn isdnctl isdnbchan0 isdnbchan1 isdntel0 isdntel1 isdnteld0 isdnteld1 isdntrc0 isdntrc1
                    366:        ;;
                    367:
                    368: std)
                    369:        rm -f console constty drum mem kmem null zero io klog ksyms
                    370:        mknod console           c %cons_chr% 0
                    371:        mknod constty           c %cons_chr% 1
                    372:        mknod drum              c %swap_chr% 0  ; chmod 640 drum ; chgrp kmem drum
                    373:        mknod kmem              c %mem_chr% 1   ; chmod 640 kmem ; chgrp kmem kmem
                    374:        mknod mem               c %mem_chr% 0   ; chmod 640 mem ; chgrp kmem mem
                    375:        mknod null              c %mem_chr% 2   ; chmod 666 null
                    376:        mknod zero              c %mem_chr% 12  ; chmod 666 zero
                    377:        mknod klog              c %log_chr% 0   ; chmod 600 klog
                    378:        mknod ksyms             c %ksyms_chr% 0 ; chmod 444 ksyms
                    379:        if $nofdesc; then
                    380:                rm -f tty stdin stdout stderr
                    381:                mknod tty       c %ctty_chr% 0  ; chmod 666 tty
                    382:                mknod stdin     c %filedesc_chr% 0      ; chmod 666 stdin
                    383:                mknod stdout    c %filedesc_chr% 1      ; chmod 666 stdout
                    384:                mknod stderr    c %filedesc_chr% 2      ; chmod 666 stderr
                    385:        fi
                    386:        ;;
                    387:
                    388: usb*)
                    389:        unit=${i#usb}
                    390:        if [ "$unit" = "" ]; then
                    391:            unit=255
                    392:            usb=usb
                    393:        else
                    394:            usb=usb$unit
                    395:        fi
                    396:        major=%usb_chr%
                    397:        rm -f $usb
                    398:        mknod $usb c $major $unit
                    399:        chmod 600 $usb
                    400:        ;;
                    401:
                    402: uhid*)
                    403:        unit=${i#uhid}
                    404:        uhid=uhid$unit
                    405:        major=%uhid_chr%
                    406:        rm -f $uhid
                    407:        mknod $uhid c $major $unit
                    408:        chmod 666 $uhid
                    409:        ;;
                    410:
                    411: ulpt*)
                    412:        unit=${i#ulpt}
                    413:        ulpt=ulpt$unit
                    414:        ulpn=ulpn$unit
                    415:        major=%ulpt_chr%
                    416:        rm -f $ulpt $ulpn
                    417:        mknod $ulpt c $major $unit
                    418:        mknod $ulpn c $major $(($unit + 64))
                    419:        chmod 600 $ulpt $ulpn
                    420:        ;;
                    421:
                    422: urio*)
                    423:        unit=${i#urio}
                    424:        urio=urio$unit
                    425:        major=%urio_chr%
                    426:        rm -f $urio
                    427:        mknod $urio c $major $unit
                    428:        chmod 666 $urio
                    429:        ;;
                    430:
                    431: uscanner*)
                    432:        unit=${i#uscanner}
                    433:        uscanner=uscanner$unit
                    434:        major=%uscanner_chr%
                    435:        rm -f $uscanner
                    436:        mknod $uscanner c $major $unit
                    437:        chmod 600 $uscanner
                    438:        ;;
                    439:
                    440: ttyU*)
                    441:        unit=${i#ttyU}
                    442:        ttyU=ttyU$unit
                    443:        dtyU=dtyU$unit
                    444:        ctyU=ctyU$unit
                    445:        major=%ucom_chr%
                    446:        rm -f $ttyU $dtyU $ctyU
                    447:        mknod $ttyU c $major $(($unit + $dialin  ))
                    448:        mknod $dtyU c $major $(($unit + $dialout ))
                    449:        mknod $ctyU c $major $(($unit + $callunit))
                    450:        chown uucp $ttyU $dtyU $ctyU
                    451:        chmod 600 $ttyU $dtyU $ctyU
                    452:        ;;
                    453:
                    454: ugen*)
                    455:        unit=${i#ugen}
                    456:        ugen=ugen$unit
                    457:        major=%ugen_chr%
                    458:        for j in 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
                    459:        do
                    460:                ugenj=$ugen.$j
                    461:                rm -f $ugenj
                    462:                mknod $ugenj c $major $(($unit * 16 + ${j#0}))
                    463:                chmod 600 $ugenj
                    464:        done
                    465:        ;;
                    466:
                    467: wscons)
                    468:        makedev ttyE0 ttyE1 ttyE2 ttyE3 ttyE4 ttyE5 ttyE6 ttyE7
                    469:        makedev wsmouse0 wsmouse1 wsmouse2 wsmouse3
                    470:        makedev wskbd0 wskbd1 wskbd2 wskbd3
                    471:        makedev wsmux0 wsmux1 wsmux2 wsmux3
                    472:        makedev wsmouse wskbd
                    473:        makedev ttyEcfg ttyEstat
                    474:        makedev wsfont
                    475:        ;;
                    476:
                    477: wsmouse)
                    478:        rm -f wsmouse
1.4       jdolecek  479:        mknod wsmouse c %wsmux_chr% 0
1.1       jdolecek  480:        chmod 600 wsmouse
                    481:        ;;
                    482:
                    483: wskbd)
                    484:        rm -f wskbd
1.4       jdolecek  485:        mknod wskbd c %wsmux_chr% 1
1.1       jdolecek  486:        chmod 600 wskbd
                    487:        ;;
                    488:
                    489: wsmux*)
                    490:        unit=${i#wsmux}
                    491:        unitctl=$(($unit + 128))
                    492:        wsmux=wsmux$unit
                    493:        wsmuxctl=wsmuxctl$unit
                    494:        major=%wsmux_chr%
                    495:        rm -f $wsmux $wsmuxctl
                    496:        mknod $wsmux c $major $unit
                    497:        chmod 600 $wsmux
                    498:        mknod $wsmuxctl c $major $unitctl
                    499:        chmod 200 $wsmuxctl
                    500:        ;;
                    501:
                    502: ttyEstat)
                    503:        chr=%wsdisplay_chr%
                    504:        rm -f ttyEstat
                    505:        mknod ttyEstat c $chr 254
                    506:        chmod 600 ttyEstat
                    507:        ;;
                    508:
                    509: ttyEcfg)
                    510:        chr=%wsdisplay_chr%
                    511:        rm -f ttyEcfg
                    512:        mknod ttyEcfg c $chr 255
                    513:        chmod 600 ttyEcfg
                    514:        ;;
                    515:
                    516: ttyE*)
                    517:        chr=%wsdisplay_chr%; unit=${i#ttyE}
                    518:        rm -f ttyE$unit
                    519:        mknod ttyE$unit c $chr $unit
                    520:        ;;
                    521:
                    522: wsmouse*)
                    523:        unit=${i#wsmouse}
                    524:        wsmouse=wsmouse$unit
                    525:        major=%wsmouse_chr%
                    526:        rm -f $wsmouse
                    527:        mknod $wsmouse c $major $unit
                    528:        chmod 600 $wsmouse
                    529:        ;;
                    530:
                    531: wskbd*)
                    532:        unit=${i#wskbd}
                    533:        wskbd=wskbd$unit
                    534:        major=%wskbd_chr%
                    535:        rm -f $wskbd
                    536:        mknod $wskbd c $major $unit
                    537:        chmod 600 $wskbd
                    538:        ;;
                    539:
                    540: fd)
                    541:        if $nofdesc; then
                    542:                rm -f fd/*
                    543:                mkdir fd 2>/dev/null
                    544:                n=0
                    545:                while [ $n -lt 64 ]; do
1.4       jdolecek  546:                        mknod fd/$n c %filedesc_chr% $n
1.1       jdolecek  547:                        n=$(($n + 1))
                    548:                done
                    549:                chmod 755 fd
                    550:                chmod 666 fd/*
                    551:        fi
                    552:        ;;
                    553:
                    554: wt*)
                    555:        case $i in
                    556:        wt*) name=wt;  unit=${i#wt};    chr=%wt_chr%;   blk=%wt_blk%;;
                    557:        esac
                    558:        for sub in $unit $(($unit+8)) $(($unit+16))
                    559:        do
                    560:            rm -f $name$sub n$name$sub r$name$sub nr$name$sub
                    561:            mknod $name$sub     b $blk $(($sub + 0))
                    562:            mknod n$name$sub    b $blk $(($sub + 4))
                    563:            mknod r$name$sub    c $chr $(($sub + 0))
                    564:            mknod nr$name$sub   c $chr $(($sub + 4))
                    565:            chgrp operator $name$sub n$name$sub r$name$sub nr$name$sub
                    566:            chmod 660 $name$sub n$name$sub r$name$sub nr$name$sub
                    567:        done
                    568:        ;;
                    569:
                    570: md*)
1.4       jdolecek  571:        makedisk_minimal md ${i#md} %md_blk% %md_chr%
1.11      hannken   572:        ;;
                    573:
                    574: fss*)
                    575:        name=fss; unit=${i#fss};        blk=%fss_blk%;  chr=%fss_chr%
1.13    ! lukem     576:        rm -f $name$unit r$name$unit
1.11      hannken   577:        mknod $name$unit        b $blk $unit
                    578:        mknod r$name$unit       c $chr $unit
                    579:        chgrp operator $name$unit r$name$unit
                    580:        chmod 660 $name$unit r$name$unit
1.1       jdolecek  581:        ;;
                    582:
                    583: ss*)
                    584:        case $i in
                    585:        ss*) name=ss;   unit=${i#ss};   chr=%ss_chr%;;
                    586:        esac
                    587:        rm -f $name$unit n$name$unit en$name$unit
                    588:        mknod $name$unit        c $chr $(($unit * 16 + 0))
                    589:        mknod n$name$unit       c $chr $(($unit * 16 + 1))
                    590:        mknod en$name$unit      c $chr $(($unit * 16 + 3))
                    591:        chgrp operator $name$unit n$name$unit en$name$unit
                    592:        chmod 640 $name$unit n$name$unit en$name$unit
                    593:        ;;
                    594:
1.5       jdolecek  595: ccd*|cgd*|raid*|vnd*)
1.1       jdolecek  596:        case $i in
                    597:        ccd*) name=ccd; unit=${i#ccd};  blk=%ccd_blk%;  chr=%ccd_chr%;;
                    598:        cgd*) name=cgd; unit=${i#cgd};  blk=%cgd_blk%;  chr=%cgd_chr%;;
                    599:        raid*) name=raid; unit=${i#raid}; blk=%raid_blk%; chr=%raid_chr%;;
                    600:        vnd*) name=vnd; unit=${i#vnd};  blk=%vnd_blk%;  chr=%vnd_chr%;;
                    601:        esac
1.5       jdolecek  602:        %MKDISK% $name $unit $blk $chr
                    603:        ;;
                    604:
                    605: sd*)
                    606:        name=sd; unit=${i#sd};  blk=%sd_blk%;   chr=%sd_chr%
1.1       jdolecek  607:        %MKDISK% $name $unit $blk $chr
                    608:        ;;
                    609:
                    610: wd*)
                    611:        name=wd; unit=${i#wd}; blk=%wd_blk%; chr=%wd_chr%
                    612:        %MKDISK% $name $unit $blk $chr
                    613:        ;;
                    614:
                    615: fd*)
                    616:        name=fd; unit=${i#fd}; blk=%fd_blk%; chr=%fd_chr%
                    617:        %MKDISK% $name $unit $blk $chr
                    618:        ;;
                    619:
                    620: ld*)
                    621:        name=ld; unit=${i#ld}; blk=%ld_blk%; chr=%ld_chr%
                    622:        %MKDISK% $name $unit $blk $chr
                    623:        ;;
                    624:
                    625: ed*)
                    626:        name=ed; unit=${i#ed}; blk=%ed_blk%; chr=%ed_chr%
                    627:        %MKDISK% $name $unit $blk $chr
                    628:        ;;
                    629:
                    630: ofdisk*)
                    631:        name=ofdisk; unit=${i#ofdisk}; blk=%ofdisk_blk%; chr=%ofdisk_chr%
                    632:        %MKDISK% $name $unit $blk $chr
                    633:        ;;
                    634:
                    635: ttyCZ*)
                    636:        unit=${i#ttyCZ}
                    637:        major=%cz_chr%
                    638:        minor=$(($unit * 64))
                    639:        eminor=$(($minor + 64))
                    640:        while [ $minor -lt $eminor ]; do
                    641:                if [ $minor -lt 10 ]; then
                    642:                        nminor=000$minor
                    643:                elif [ $minor -lt 100 ]; then
                    644:                        nminor=00$minor
                    645:                elif [ $minor -lt 1000 ]; then
                    646:                        nminor=0$minor
                    647:                else
                    648:                        nminor=$minor
                    649:                fi
                    650:                rm -f ttyCZ$nminor dtyCZ$nminor
                    651:                mknod ttyCZ$nminor c $major $(($minor + $dialin  ))
                    652:                mknod dtyCZ$nminor c $major $(($minor + $dialout ))
                    653:                chown uucp ttyCZ$nminor dtyCZ$nminor
                    654:                chmod 600 ttyCZ$nminor dtyCZ$nminor
                    655:                minor=$(($minor + 1))
                    656:        done
                    657:        ;;
                    658:
                    659: ttyCY*)
                    660:        unit=${i#ttyCY}
                    661:        major=%cy_chr%
                    662:        minor=$(($unit * 32))
                    663:        eminor=$(($minor + 32))
                    664:        while [ $minor -lt $eminor ]; do
                    665:                if [ $minor -lt 10 ]; then
                    666:                        nminor=00$minor
                    667:                elif [ $minor -lt 100 ]; then
                    668:                        nminor=0$minor
                    669:                else
                    670:                        nminor=$minor
                    671:                fi
                    672:                rm -f ttyCY$nminor dtyCY$nminor
                    673:                mknod ttyCY$nminor c $major $(($minor + $dialin  ))
                    674:                mknod dtyCY$nminor c $major $(($minor + $dialout ))
                    675:                chown uucp ttyCY$nminor dtyCY$nminor
                    676:                chmod 600 ttyCY$nminor dtyCY$nminor
                    677:                minor=$(($minor + 1))
                    678:        done
                    679:        ;;
                    680:
1.4       jdolecek  681: tty[0-9]|tty0[0-9])
                    682:        # some archs have built-in zstty (major %zstty_chr%) instead
                    683:        # of NS16550; create ttyZ* and hardlink as [dt]ty0*; this
                    684:        # needs to be before com entry, for archs which have both
                    685:        unit=${i#tty}
                    686:        unit=$(($unit + 0))
                    687:        makedev ttyZ${unit}
                    688:        rm -f tty0$unit dty0$unit
1.7       he        689:        ln -fs ttyZ$unit tty0${unit}
                    690:        ln -fs dtyZ$unit dty0${unit}
1.4       jdolecek  691:        ;;
                    692:
1.3       jdolecek  693: tty0*|tty1*|tty[0-9])
1.1       jdolecek  694:        ounit=${i#tty}
                    695:        ounit=$(($ounit + 0))
                    696:        if [ $ounit -lt 10 ]; then
                    697:                unit=0$ounit
                    698:        else
                    699:                unit=$ounit
                    700:        fi
                    701:        rm -f tty$unit dty$unit
                    702:        mknod tty$unit c %com_chr% $(($ounit + $dialin ))
                    703:        mknod dty$unit c %com_chr% $(($ounit + $dialout))
                    704:        chown uucp tty$unit dty$unit
                    705:        ;;
                    706:
                    707: ttyC*)
                    708:        # some archs call it ttyC traditionally
                    709:        unit=${i#ttyC}
                    710:        rm -f ttyC$unit dtyC$unit
                    711:        mknod ttyC$unit c %com_chr% $(($unit + $dialin))
                    712:        mknod dtyC$unit c %com_chr% $(($unit + $dialout))
                    713:        chown uucp ttyC$unit dtyC$unit
                    714:        ;;
                    715:
                    716: ttyh*)
                    717:        unit=${i#ttyh}
                    718:        rm -f ttyh$unit dtyh$unit
                    719:        mknod ttyh$unit c %sabtty_chr% $(($unit + $dialin ))
                    720:        mknod dtyh$unit c %sabtty_chr% $(($unit + $dialout))
                    721:        chown uucp ttyh$unit dtyh$unit
                    722:        ;;
                    723:
                    724: ttyZ*)
                    725:        name=ttyZ; dname=dtyZ; unit=${i#ttyZ}; chr=%zstty_chr%
                    726:        rm -f $name$unit $dname$unit
                    727:        mknod  $name$unit c $chr $(($unit + $dialin ))
                    728:        mknod $dname$unit c $chr $(($unit + $dialout))
                    729:        chown uucp $name$unit $dname$unit
                    730:        ;;
                    731:
                    732: opty)
                    733:        rm -f ttyp[0-9a-f] ptyp[0-9a-f]
                    734:        for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f
                    735:        do
                    736:                case $j in
                    737:                [0-9])  jn=$j ;;
                    738:                a)      jn=10 ;;
                    739:                b)      jn=11 ;;
                    740:                c)      jn=12 ;;
                    741:                d)      jn=13 ;;
                    742:                e)      jn=14 ;;
                    743:                f)      jn=15 ;;
                    744:                esac
                    745:                mknod ttyp$j c %pts_chr% $jn
                    746:                mknod ptyp$j c %ptc_chr% $jn
                    747:        done
                    748:        chmod 666 ttyp[0-9a-f] ptyp[0-9a-f]
                    749:        ;;
                    750:
                    751: pty*)
                    752:        class=${i#pty}
                    753:        set -- p q r s t u v w x y z P Q R S T
                    754:        if [ "$class" -ge $# ]; then
                    755:                echo "$MAKEDEV: $i: pty unit must be between 0 and 15"
                    756:                continue
                    757:        fi
                    758:        shift $class
                    759:        name=$1
                    760:        if [ "$name" = v ]; then
                    761:                echo "$MAKEDEV: $i: pty unit conflicts with console ttyv0 device."
                    762:                continue
                    763:        fi
                    764:        rm -f tty$name[0-9a-zA-Z] pty$name[0-9a-zA-Z]
                    765:        jn=0
                    766:        unit=$(($class * 16))
                    767:        names=
                    768:        set -- - 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
                    769:        while
                    770:                shift
                    771:                j=$1
                    772:                [ -n "$j" ]
                    773:        do
                    774:                if [ $j = g ]; then
                    775:                        unit=$(($unit + $class * 30 + 256 - 16))
                    776:                fi
                    777:                mknod tty$name$j c %pts_chr% $unit
                    778:                mknod pty$name$j c %ptc_chr% $unit
                    779:                names="$names tty$name$j pty$name$j"
                    780:                unit=$(($unit + 1))
                    781:        done
                    782:        chmod 666 $names
                    783:        unset names
                    784:        ;;
                    785:
1.4       jdolecek  786: stic*)
                    787:        unit=${i#stic}
                    788:        rm -f stic$unit
                    789:        mknod stic$unit c %stic_chr% $unit
                    790:        chmod 600 stic$unit
                    791:        ;;
                    792:
1.1       jdolecek  793: st*)
                    794:        case $i in
                    795:        st*) name=st;   unit=${i#st};   chr=%st_chr%;   blk=%st_blk%;;
                    796:        esac
                    797:        rm -f $name$unit n$name$unit e$name$unit en$name$unit \
                    798:                r$name$unit nr$name$unit er$name$unit enr$name$unit
                    799:        mknod $name$unit        b $blk $(($unit * 16 + 0))
                    800:        mknod n$name$unit       b $blk $(($unit * 16 + 1))
                    801:        mknod e$name$unit       b $blk $(($unit * 16 + 2))
                    802:        mknod en$name$unit      b $blk $(($unit * 16 + 3))
                    803:        mknod r$name$unit       c $chr $(($unit * 16 + 0))
                    804:        mknod nr$name$unit      c $chr $(($unit * 16 + 1))
                    805:        mknod er$name$unit      c $chr $(($unit * 16 + 2))
                    806:        mknod enr$name$unit     c $chr $(($unit * 16 + 3))
                    807:        chgrp operator $name$unit n$name$unit e$name$unit en$name$unit \
                    808:                r$name$unit nr$name$unit er$name$unit enr$name$unit
                    809:        chmod 660 $name$unit n$name$unit e$name$unit en$name$unit \
                    810:                r$name$unit nr$name$unit er$name$unit enr$name$unit
                    811:        ;;
                    812:
                    813: ses*|ch*|uk*)
                    814:        case $i in
                    815:        ch*) name=ch;   unit=${i#ch};   chr=%ch_chr%;;
                    816:        uk*) name=uk;   unit=${i#uk};   chr=%uk_chr%;;
                    817:        ses*) name=ses; unit=${i#ses};  chr=%ses_chr%;;
                    818:        esac
                    819:        rm -f $name$unit
                    820:        mknod $name$unit        c $chr $unit
                    821:        chgrp operator $name$unit
                    822:        chmod 640 $name$unit
                    823:        ;;
                    824:
1.4       jdolecek  825: cd*)
                    826:        makedisk_minimal cd ${i#cd} %cd_blk% %cd_chr% %
                    827:        ;;
                    828:
                    829: mcd*)
                    830:        makedisk_minimal mcd ${i#mcd} %mcd_blk% %mcd_chr%
1.1       jdolecek  831:        ;;
                    832:
                    833: gdrom*)
1.4       jdolecek  834:        makedisk_minimal gdrom ${i#gdrom} %gdrom_blk% %gdrom_chr%
1.1       jdolecek  835:        ;;
                    836:
                    837: lpt*|lpa*)
                    838:        case $i in
                    839:        lpt*) name=lpt; unit=${i#lpt};  chr=%lpt_chr%;  flags=0;;
                    840:        lpa*) name=lpa; unit=${i#lpa};  chr=%lpt_chr%;  flags=128;;
                    841:        esac
                    842:        rm -f $name$unit
                    843:        mknod $name$unit        c $chr $(($unit + $flags))
                    844:        ;;
                    845:
                    846: bpf*|tun*)
                    847:        case $i in
                    848:        bpf*) name=bpf; unit=${i#bpf};  chr=%bpf_chr%;;
                    849:        tun*) name=tun; unit=${i#tun};  chr=%tun_chr%;;
                    850:        esac
                    851:        rm -f $name$unit
                    852:        mknod $name$unit        c $chr $unit
                    853:        ;;
                    854:
                    855: joy*)
                    856:        case $i in
                    857:        joy*) name=joy; unit=${i#joy};  chr=%joy_chr%;;
                    858:        esac
                    859:        rm -f $name$unit
                    860:        mknod $name$unit        c $chr $unit
                    861:        ;;
                    862:
                    863: ipl)
                    864:        rm -f ipl ipnat ipstate ipauth
                    865:        mknod ipl c %ipl_chr% 0
                    866:        mknod ipnat c %ipl_chr% 1
                    867:        mknod ipstate c %ipl_chr% 2
                    868:        mknod ipauth c %ipl_chr% 3
                    869:        chmod 600 ipl ipnat ipstate ipauth
                    870:        ;;
                    871:
                    872: pf)
                    873:        rm -f pf
                    874:        mknod pf c %pf_chr% 0
                    875:        chmod 600 pf
                    876:        ;;
                    877:
                    878: crypto)
                    879:        rm -f crypto
                    880:        mknod crypto c %crypto_chr% 0
                    881:        chmod 666 crypto
                    882:        ;;
                    883:
                    884: speaker)
                    885:        rm -f speaker
                    886:        mknod speaker c %spkr_chr% 0
                    887:        ;;
                    888:
                    889: lkm)
                    890:        rm -f lkm
                    891:        mknod lkm c %lkm_chr% 0
                    892:        chgrp kmem lkm
                    893:        chmod 640 lkm
                    894:        ;;
                    895:
                    896: audio*)
                    897:        unit=${i#audio}
                    898:        audio=audio$unit
                    899:        sound=sound$unit
                    900:        mixer=mixer$unit
                    901:        major=%audio_chr%
                    902:        audioctl=audioctl$unit
                    903:        if [ "$unit" = "" ]; then unit=0; fi
                    904:        rm -f $audio $sound $mixer $audioctl
                    905:        mknod $sound    c $major $(($unit + 0))
                    906:        mknod $audio    c $major $(($unit + 128))
                    907:        mknod $mixer    c $major $(($unit + 16))
                    908:        mknod $audioctl c $major $(($unit + 192))
                    909:        chmod 666 $audio $sound $mixer $audioctl
                    910:        ;;
                    911:
                    912: rmidi*)
                    913:        unit=${i#rmidi}
                    914:        major=%midi_chr%
                    915:        rmidi=rmidi$unit
                    916:        rm -f $rmidi
                    917:        mknod $rmidi c $major $unit
                    918:        chmod 666 $rmidi
                    919:        ;;
                    920:
                    921: music*)
                    922:        unit=${i#music}
                    923:        music=music$unit
                    924:        sequencer=sequencer$unit
                    925:        major=%sequencer_chr%
                    926:        if [ "$unit" = "" ]; then unit=0; fi
                    927:        rm -f $sequencer $music
                    928:        mknod $music     c $major $(($unit + 0))
                    929:        mknod $sequencer c $major $(($unit + 128))
                    930:        chmod 666 $music $sequencer
                    931:        ;;
                    932:
                    933: radio*)
                    934:        unit=${i#radio}
                    935:        radio=radio$unit
                    936:        major=%radio_chr%
                    937:        if [ "$unit" = "" ]; then unit=0; fi
                    938:        rm -f $radio
                    939:        mknod $radio c $major $unit
                    940:        chmod 666 $radio
                    941:        ;;
                    942:
                    943: apm*)
                    944:        rm -f apm apmctl
                    945:        mknod apm c %apm_chr% 0
                    946:        mknod apmctl c %apm_chr% 8
                    947:        chmod 644 apm apmctl
                    948:        ;;
                    949:
1.4       jdolecek  950: apm*)
                    951:        rm -f apm apmctl
                    952:        mknod apm c %apmdev_chr% 0
                    953:        mknod apmctl c %apmdev_chr% 8
                    954:        chmod 644 apm apmctl
                    955:        ;;
                    956:
1.1       jdolecek  957: satlink*)
                    958:        unit=${i#satlink}
                    959:        rm -f satlink$unit
                    960:        mknod satlink$unit c %satlink_chr% $unit
                    961:        chmod 444 satlink$unit
                    962:        ;;
                    963:
                    964: random)
                    965:        rm -f random urandom
                    966:        mknod random c %rnd_chr% 0
                    967:        mknod urandom c %rnd_chr% 1
                    968:        chmod 444 random
                    969:        chmod 644 urandom
                    970:        ;;
                    971:
                    972: cfs*)
                    973:        unit=${i#cfs}
                    974:        cfs=cfs$unit
                    975:        major=%vcoda_chr%
                    976:        rm -f $cfs
                    977:        mknod $cfs c $major $unit
                    978:        chmod 600 $cfs
                    979:        ;;
                    980:
                    981: sysmon)
                    982:        major=%sysmon_chr%
                    983:        rm -f sysmon
                    984:        mknod sysmon c $major 0
                    985:        chmod 644 sysmon
                    986:
                    987:        rm -f watchdog
                    988:        mknod watchdog c $major 1
                    989:        chmod 644 watchdog
                    990:
                    991:        rm -f power
                    992:        mknod power c $major 2
                    993:        chmod 640 power
                    994:        ;;
                    995:
                    996: scsibus*)
                    997:        unit=${i#scsibus}
                    998:        rm -f scsibus$unit
                    999:        mknod scsibus$unit c %scsibus_chr% $unit
                   1000:        chmod 644 scsibus$unit
                   1001:        ;;
                   1002:
                   1003: bktr)
                   1004:        makedev bktr0 bktr1
                   1005:        ln -fs bktr0 bktr
                   1006:        ln -fs tuner0 tuner
                   1007:        ln -fs vbi0 vbi
                   1008:        ;;
                   1009:
                   1010: bktr*)
                   1011:        major=%bktr_chr%
                   1012:        unit=${i#bktr}
                   1013:        rm -f bktr$unit tuner$unit vbi$unit
                   1014:        mknod bktr$unit c $major $(($unit + 0))
                   1015:        mknod tuner$unit c $major $(($unit + 16))
                   1016:        mknod vbi$unit c $major $(($unit + 32))
                   1017:        chmod 444 bktr$unit tuner$unit vbi$unit
                   1018:        ;;
                   1019:
                   1020: iop*)
                   1021:        unit=${i#iop}
                   1022:        rm -f iop$unit
                   1023:        mknod iop$unit c %iop_chr% $unit
                   1024:        chmod 600 iop$unit
                   1025:        ;;
                   1026:
                   1027: mlx*)
                   1028:        unit=${i#mlx}
                   1029:        rm -f mlx$unit
                   1030:        mknod mlx$unit c %mlx_chr% $unit
                   1031:        chmod 600 mlx$unit
                   1032:        ;;
                   1033:
                   1034: mly*)
                   1035:        unit=${i#mly}
                   1036:        rm -f mly$unit
                   1037:        mknod mly$unit c %mly_chr% $unit
                   1038:        chmod 600 mly$unit
                   1039:        ;;
                   1040:
                   1041: twe*)
                   1042:        unit=${i#twe}
                   1043:        rm -f twe$unit
                   1044:        mknod twe$unit c %twe_chr% $unit
                   1045:        chmod 600 twe$unit
                   1046:        ;;
                   1047:
                   1048: icp*)
                   1049:        unit=${i#icp}
                   1050:        rm -f icp$unit
                   1051:        mknod icp$unit c %icp_chr% $unit
                   1052:        chmod 600 icp$unit
                   1053:        ;;
                   1054:
                   1055: agp*)
                   1056:        unit=${i#agp}
                   1057:        rm -f agp$unit
                   1058:        mknod agp$unit c %agp_chr% $unit
                   1059:        if [ "$unit" = "0" ]; then ln -fs agp$unit agpgart; fi
                   1060:        chmod 644 agp$unit
                   1061:        ;;
                   1062:
                   1063: pci*)
                   1064:        unit=${i#pci}
                   1065:        rm -f pci$unit
                   1066:        mknod pci$unit c %pci_chr% $unit
                   1067:        chmod 644 pci$unit
                   1068:        ;;
                   1069:
                   1070: dpti*)
                   1071:        unit=${i#dpti}
                   1072:        rm -f dpti$unit
                   1073:        mknod dpti$unit c %dpti_chr% $unit
                   1074:        chmod 600 dpti$unit
                   1075:        ;;
                   1076:
                   1077: dpt*)
                   1078:        unit=${i#dpt}
                   1079:        rm -f dpt$unit
                   1080:        mknod dpt$unit c %dpt_chr% $unit
                   1081:        chmod 600 dpt$unit
                   1082:        ;;
                   1083:
                   1084: altq)
                   1085:        mkdir altq 2>/dev/null
                   1086:        chmod 755 altq
                   1087:        unit=0
                   1088:        for dev in altq cbq wfq afm fifoq red rio localq hfsc \
                   1089:            cdnr blue priq; do
                   1090:                rm -f altq/$dev
                   1091:                mknod altq/$dev c %altq_chr% $unit
                   1092:                chmod 644 altq/$dev
                   1093:                unit=$(($unit + 1))
                   1094:        done
                   1095:        ;;
                   1096:
                   1097: isdn)
                   1098:        rm -f isdn
                   1099:        mknod isdn c %isdn_chr% 0
                   1100:        chmod 600 isdn
                   1101:        ;;
                   1102:
                   1103: isdnctl)
                   1104:        rm -f isdnctl
                   1105:        mknod isdnctl c %isdnctl_chr% 0
                   1106:        chmod 600 isdnctl
                   1107:        ;;
                   1108:
                   1109: isdnbchan*)
                   1110:        unit=${i#isdnbchan}
                   1111:        rm -f isdnbchan$unit
                   1112:        mknod isdnbchan$unit c %isdnbchan_chr% $unit
                   1113:        chmod 600 isdnbchan$unit
                   1114:        ;;
                   1115:
                   1116: isdnteld*)
                   1117:        unit=${i#isdnteld}
                   1118:        rm -f isdnteld$unit
                   1119:        mknod isdnteld$unit c %isdntel_chr% $(($unit + 64))
                   1120:        chmod 600 isdnteld$unit
                   1121:        ;;
                   1122:
                   1123: isdntel*)
                   1124:        unit=${i#isdntel}
                   1125:        rm -f isdntel$unit
                   1126:        mknod isdntel$unit c %isdntel_chr% $unit
                   1127:        chmod 600 isdntel$unit
                   1128:        ;;
                   1129:
                   1130: isdntrc*)
                   1131:        unit=${i#isdntrc}
                   1132:        rm -f isdntrc$unit
                   1133:        mknod isdntrc$unit c %isdntrc_chr% $unit
                   1134:        chmod 600 isdntrc$unit
                   1135:        ;;
                   1136:
                   1137: vmegen)
                   1138:        makedev vmegen0 vmegen1 vmegen2 vmegen3
                   1139:        ;;
                   1140:
                   1141: vmegen*)
                   1142:        unit=${i#vmegen}
                   1143:        rm -f vmegen$unit
                   1144:        mknod vmegen$unit c %vmegeneric_chr% $(($unit * 16 + 0))
                   1145:        chmod 600 vmegen$unit
                   1146:        ;;
                   1147:
                   1148: wsfont)
                   1149:        rm -f wsfont
                   1150:        mknod wsfont c %wsfont_chr% 0
                   1151:        chmod 600 wsfont
                   1152:        ;;
                   1153:
                   1154: cir*)
                   1155:        unit=${i#cir}
                   1156:        cir=cir$unit
                   1157:        major=%cir_chr%
                   1158:        rm -f $cir
                   1159:        mknod $cir c $major $unit
                   1160:        chmod 666 $cir
                   1161:        ;;
                   1162:
                   1163: irframe*)
                   1164:        unit=${i#irframe}
                   1165:        irframe=irframe$unit
                   1166:        major=%irframe_chr%
                   1167:        rm -f $irframe
                   1168:        mknod $irframe c $major $unit
                   1169:        chmod 600 $irframe
                   1170:        ;;
                   1171:
                   1172: fcom*)
                   1173:        unit=${i#fcom}
                   1174:        fcom=fcom$unit
                   1175:        rm -f $fcom
                   1176:        mknod $fcom c %fcom_chr% $unit
                   1177:        chown uucp $fcom
                   1178:        chmod 600 $fcom
                   1179:        ;;
                   1180:
                   1181: beep)
                   1182:        rm -f beep
                   1183:        mknod beep c %beep_chr% 0
                   1184:        ;;
                   1185:
                   1186: openfirm)
                   1187:        rm -f openfirm
                   1188:        mknod openfirm c %openfirm_chr% 0
                   1189:        chmod 444 openfirm
                   1190:        ;;
                   1191:
                   1192: nvram)
                   1193:        rm -f nvram
                   1194:        mknod nvram c %nvram_chr% 0
                   1195:        chmod 644 nvram
                   1196:        ;;
                   1197:
                   1198: rtc)
1.4       jdolecek 1199:        mknod rtc c %rtc_chr% 0
1.1       jdolecek 1200:        chmod 644 rtc
                   1201:        ;;
                   1202:
                   1203: clockctl)
                   1204:        rm -f clockctl
                   1205:        mknod clockctl c %clockctl_chr% 0
                   1206:        chgrp ntpd clockctl
                   1207:        chmod 660 clockctl
                   1208:        ;;
                   1209:
                   1210: nsmb)
                   1211:        makedev nsmb0 nsmb1 nsmb2 nsmb3
                   1212:        ;;
                   1213:
                   1214: nsmb*)
                   1215:        unit=${i#nsmb}
                   1216:        nsmb=nsmb$unit
                   1217:        major=%nsmb_chr%
                   1218:        rm -f $nsmb
                   1219:        mknod $nsmb c $major $unit
                   1220:        chmod 644 $nsmb
                   1221:        ;;
                   1222:
                   1223: systrace)
                   1224:        rm -f systrace
                   1225:        mknod systrace c %systrace_chr% 0
                   1226:        chmod 644 systrace
                   1227:        ;;
                   1228:
                   1229: kttcp)
                   1230:        rm -f kttcp
                   1231:        mknod kttcp c %kttcp_chr% 0
                   1232:        chmod 600 kttcp
                   1233:        ;;
                   1234:
                   1235: dmoverio)
                   1236:        rm -f dmoverio
                   1237:        mknod dmoverio c %dmoverio_chr% 0
                   1238:        chmod 644 dmoverio
                   1239:        ;;
                   1240:
                   1241: veriexec)
                   1242:        rm -f veriexec
                   1243:        mknod veriexec c %veriexec_chr% 0
                   1244:        chmod 644 veriexec
                   1245:        ;;
                   1246:
                   1247: ttyv*)
                   1248:        chr=%pc_chr%; unit=${i#ttyv}
                   1249:        rm -f ttyv$unit
                   1250:        mknod ttyv$unit c $chr $unit
                   1251:        ;;
                   1252:
1.4       jdolecek 1253: ttyv*)
                   1254:        chr=%physcon_chr%; unit=${i#ttyv}
                   1255:        rm -f ttyv$unit
                   1256:        mknod ttyv$unit c $chr $unit
                   1257:        ;;
                   1258:
1.1       jdolecek 1259: arcpp*)
                   1260:        chr=%arcpp_chr%; unit=${i#arcpp}
1.4       jdolecek 1261:        mkdev arcpp$unit c $chr $unit
1.1       jdolecek 1262:        ;;
                   1263:
                   1264: par*)
                   1265:        unit=${i#par};  chr=%par_chr%
                   1266:        rm -f par$unit
                   1267:        case $unit in
                   1268:        0)
                   1269:                mknod par$unit  c $chr $unit
                   1270:                ;;
                   1271:        *)
                   1272:                echo bad unit for par in: $i
                   1273:                ;;
                   1274:        esac
                   1275:        ;;
                   1276:
                   1277: ite*|ttye*)
1.4       jdolecek 1278:        case $i in
                   1279:        ite*)   unit=${i#ite};;
                   1280:        ttye*)  unit=${i#ttye};;
                   1281:        esac
                   1282:        chr=%ite_chr%
                   1283:        rm -f ttye$unit ite*
1.1       jdolecek 1284:        mknod ttye$unit c $chr $unit
                   1285:        ;;
                   1286:
                   1287: pms*)
1.4       jdolecek 1288:        name=pms
                   1289:        major=%opms_chr%
                   1290:        unit=${i#pms}
1.1       jdolecek 1291:        rm -f $name$unit
                   1292:        mknod $name$unit c $major $unit
                   1293:        ;;
                   1294:
                   1295: qms*)
1.4       jdolecek 1296:        name=qms
1.1       jdolecek 1297:        major=%qms_chr%
                   1298:        unit=${i#qms}
                   1299:        rm -f $name$unit
                   1300:        mknod $name$unit c $major $unit
                   1301:        ;;
                   1302:
                   1303: lms*)
1.4       jdolecek 1304:        name=lms
1.1       jdolecek 1305:        major=%lms_chr%
                   1306:        unit=${i#lms}
                   1307:        rm -f $name$unit
                   1308:        mknod $name$unit c $major $unit
                   1309:        ;;
                   1310:
                   1311: mms*)
                   1312:        major=%mms_chr%
                   1313:        unit=${i#mms}
                   1314:        rm -f $name$unit
                   1315:        mknod $name$unit c $major $unit
                   1316:        ;;
                   1317:
                   1318: mouse-*)
                   1319:        case $i in
                   1320:        mouse-pms*) name=pms;   unit=${i#mouse-pms};;
                   1321:        mouse-qms*) name=qms;   unit=${i#mouse-qms};;
                   1322:        esac
                   1323:        ln -fs $name$unit mouse
                   1324:        ;;
                   1325:
                   1326: kbd)
                   1327:        rm -f kbd
                   1328:        mknod kbd c %kbd_chr% 0
                   1329:        ;;
                   1330:
1.4       jdolecek 1331: kbdctl)
                   1332:        rm -f kbdctl
                   1333:        mknod kbdctl c %kbd_chr% 1
                   1334:        ;;
                   1335:
                   1336: vidcconsole0)
                   1337:        mknod vidcconsole0 c %vidcconsole_chr% 0
                   1338:        chmod 640 vidcconsole0
                   1339:        ;;
                   1340:
1.1       jdolecek 1341: view*)
                   1342:        unit=${i#view}; chr=%view_chr%
                   1343:        rm -f view$unit
                   1344:        mknod view$unit c $chr $unit
                   1345:        chmod 666 view$unit
                   1346:        ;;
                   1347:
                   1348: mouse*)
                   1349:        unit=${i#mouse};        chr=%ms_chr%
                   1350:        rm -f mouse$unit
                   1351:        case $unit in
                   1352:        0|1)
                   1353:                mknod mouse$unit c      $chr $unit
                   1354:                chmod 666 mouse$unit
                   1355:                if [ $unit = 0 ]
                   1356:                then
                   1357:                        ln -fs mouse$unit mouse
                   1358:                fi
                   1359:                ;;
                   1360:        *)
                   1361:                echo bad unit for mouse in: $i
                   1362:                ;;
                   1363:        esac
                   1364:        ;;
                   1365:
                   1366: panel)
                   1367:        rm -f panel0
                   1368:        mknod panel0 c %panel_chr% 0
                   1369:        chmod 660 panel0
                   1370:        ;;
                   1371:
                   1372: ipty)
                   1373:        rm -f ttyp0 ttyp1 ptyp0 ptyp1
                   1374:        mknod ttyp0 c %pts_chr% 0
                   1375:        mknod ttyp1 c %pts_chr% 1
                   1376:        mknod ptyp0 c %ptc_chr% 0
                   1377:        mknod ptyp1 c %ptc_chr% 1
                   1378:        chmod 666 ttyp0 ttyp1 ptyp0 ptyp1
                   1379:        ;;
                   1380:
                   1381: grf*)
                   1382:        major=%grf_chr%
                   1383:        unit=${i#grf}
                   1384:        rm -f grf${unit}
1.4       jdolecek 1385:        mknod grf${unit} c ${major} ${unit}
1.1       jdolecek 1386:        chmod 666 grf${unit}
                   1387:        ;;
                   1388:
                   1389: etvme)
                   1390:        rm -f etvme
1.4       jdolecek 1391:        mknod etvme c %et_chr% 0
1.1       jdolecek 1392:        chmod 600 etvme
                   1393:        ;;
                   1394:
                   1395: leo*)
                   1396:        unit=${i#leo}
                   1397:        rm -f leo$unit
                   1398:        mknod leo$unit c %leo_chr% $unit
                   1399:        chmod 600 leo$unit
                   1400:        ;;
                   1401:
                   1402: scif*)
                   1403:        chr=%scif_chr%; unit=${i#scif}
                   1404:        name=scif
                   1405:        rm -f $name$unit
                   1406:        mknod $name$unit c $chr $unit
                   1407:        chown uucp $name$unit
                   1408:        ;;
                   1409:
                   1410: sci*)
1.4       jdolecek 1411:        chr=%sci_chr%; unit=${i#sci}
1.1       jdolecek 1412:        name=sci
                   1413:        rm -f $name$unit
                   1414:        mknod $name$unit c $chr $unit
                   1415:        chown uucp $name$unit
                   1416:        ;;
                   1417:
                   1418: maple*)
                   1419:        chr=%maple_chr%
                   1420:        case $i in
                   1421:        mapleA*) name="mapleA"; unit=0;;
                   1422:        mapleB*) name="mapleB"; unit=1;;
                   1423:        mapleC*) name="mapleC"; unit=2;;
                   1424:        mapleD*) name="mapleD"; unit=3;;
                   1425:        esac
                   1426:        subunit=${i#$name}
                   1427:        rm -f $name$subunit
                   1428:        mknod $name$subunit c $chr $(($unit * 8 + 0$subunit))
                   1429:        chmod 600 $name$subunit
                   1430:        ;;
                   1431:
                   1432: mmem*)
                   1433:        name=mmem;      unit=${i#mmem}; chr=%mmem_chr%; blk=%mmem_blk%
                   1434:        rm -f $name$unit.* r$name$unit.*
                   1435:        for pt in 0     # 1 2 3 4 ... 255
                   1436:        do
                   1437:        #mknod ${name}${unit}.${pt}a    b $blk $(($unit * 4096 + $pt * 16 + 0))
                   1438:        mknod ${name}${unit}.${pt}c     b $blk $(($unit * 4096 + $pt * 16 + 2))
                   1439:        #mknod r${name}${unit}.${pt}a   c $chr $(($unit * 4096 + $pt * 16 + 0))
                   1440:        mknod r${name}${unit}.${pt}c    c $chr $(($unit * 4096 + $pt * 16 + 2))
                   1441:        done
                   1442:        chgrp operator $name$unit.* r$name$unit.*
                   1443:        chmod 640 $name$unit.* r$name$unit.*
                   1444:        ;;
                   1445:
                   1446: mlcd*)
                   1447:        name=mlcd;      unit=${i#mlcd}; chr=%mlcd_chr%
                   1448:        rm -f $name$unit.*
                   1449:        for pt in 0     # 1 2 3 4 ... 255
                   1450:        do
                   1451:        mknod ${name}${unit}.${pt}      c $chr $(($unit * 256 + $pt))
                   1452:        done
                   1453:        chgrp operator $name$unit.*
                   1454:        chmod 640 $name$unit.*
                   1455:        ;;
                   1456:
                   1457: ixpcom*)
                   1458:        unit=${i#ixpcom}
                   1459:        rm -f ixpcom$unit
                   1460:        mknod ixpcom$unit c %ixpcom_chr% $unit
                   1461:        chown uucp ixpcom$unit
                   1462:        ;;
                   1463:
                   1464: ucbsnd)
                   1465:        rm -f ucbsnd
                   1466:        mknod ucbsnd c %ucbsnd_chr% 0
                   1467:        chmod 666 ucbsnd
                   1468:        ;;
                   1469:
                   1470: ttyTX*)
                   1471:        unit=${i#ttyTX}
                   1472:        name=ttyTX0
                   1473:        dname=dtyTX0
                   1474:
                   1475:        rm -f $name$unit $dname$unit
                   1476:        mknod $name$unit c %txcom_chr% $(($unit + $dialin ))
                   1477:        mknod $dname$unit c %txcom_chr% $(($unit + $dialout))
                   1478:        chown uucp $name$unit $dname$unit
                   1479:        ;;
                   1480:
                   1481: adb)
                   1482:        rm -f adb
                   1483:        mknod adb c %aed_chr% 0
                   1484:        chmod 666 adb
                   1485:        ;;
                   1486:
                   1487: asc*)
                   1488:        unit=${i#asc}
                   1489:        rm -f asc$unit
                   1490:        mknod asc$unit c %asc_chr% $unit
                   1491:        chmod 666 asc$unit
                   1492:        ;;
                   1493:
                   1494: bwtwo*)
                   1495:        unit=${i#bwtwo}
                   1496:        rm -f bwtwo$unit
                   1497:        mknod bwtwo$unit c %bwtwo_chr% $unit
                   1498:        chmod 666 bwtwo$unit
                   1499:        ;;
                   1500:
                   1501: cgtwo*)
                   1502:        unit=${i#cgtwo}
                   1503:        rm -f cgtwo$unit
                   1504:        mknod cgtwo$unit c %cgtwo_chr% $unit
                   1505:        chmod 666 cgtwo$unit
                   1506:        ;;
                   1507:
                   1508: cgthree*)
                   1509:        unit=${i#cgthree}
                   1510:        rm -f cgthree$unit
                   1511:        mknod cgthree$unit c %cgthree_chr% $unit
                   1512:        chmod 666 cgthree$unit
                   1513:        ;;
                   1514:
                   1515: cgfour*)
                   1516:        unit=${i#cgfour}
                   1517:        rm -f cgfour$unit
                   1518:        mknod cgfour$unit c %cgfour_chr% $unit
                   1519:        chmod 666 cgfour$unit
                   1520:        ;;
                   1521:
                   1522: cgsix*)
                   1523:        unit=${i#cgsix}
                   1524:        rm -f cgsix$unit
1.4       jdolecek 1525:        mknod cgsix$unit c %cgsix_chr% $unit
1.1       jdolecek 1526:        chmod 666 cgsix$unit
                   1527:        ;;
                   1528:
                   1529: cgeight*)
                   1530:        unit=${i#cgeight}
                   1531:        rm -f cgeight$unit
                   1532:        mknod cgeight$unit c %cgeight_chr% $unit
                   1533:        chmod 666 cgeight$unit
                   1534:        ;;
                   1535:
                   1536: tcx*)
                   1537:        unit=${i#tcx}
                   1538:        rm -f tcx$unit
                   1539:        mknod tcx$unit c %tcx_chr% $unit
                   1540:        chmod 666 tcx$unit
                   1541:        ;;
                   1542:
                   1543: xd*|xy*)
                   1544:        case $i in
                   1545:        xd*)    name=xd; unit=${i#xd}; blk=%xd_blk%;    chr=%xd_chr%;;
                   1546:        xy*)    name=xy; unit=${i#xy}; blk=%xy_blk%;    chr=%xy_chr%;;
                   1547:        esac
                   1548:        %MKDISK% $name $unit $blk $chr
                   1549:        ;;
                   1550:
                   1551: magma*)
                   1552:        unit=${i#magma}
                   1553:        if [ 0$unit -gt 3 ]
                   1554:        then
                   1555:                echo "bad unit for $i: $unit"
                   1556:                break
                   1557:        fi
                   1558:
                   1559:        rm -f tty$unit[0-9a-f] bpp$unit[01]
                   1560:        for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f
                   1561:        do
                   1562:                case $j in
                   1563:                [0-9])  jn=$j ;;
                   1564:                a)      jn=10 ;;
                   1565:                b)      jn=11 ;;
                   1566:                c)      jn=12 ;;
                   1567:                d)      jn=13 ;;
                   1568:                e)      jn=14 ;;
                   1569:                f)      jn=15 ;;
                   1570:                esac
                   1571:                mknod tty$unit$j c %mtty_chr% $(($unit * 64 + $jn))
                   1572:        done
                   1573:
                   1574:        mknod bpp${unit}0 c %mbpp_chr% $(($unit * 64 + 0))
                   1575:        mknod bpp${unit}1 c %mbpp_chr% $(($unit * 64 + 1))
                   1576:        ;;
                   1577:
                   1578: clcd*)
                   1579:        unit=${i#clcd}
                   1580:        if [ 0$unit -gt 7 ]
                   1581:        then
                   1582:                echo "bad unit for $i: $unit"
                   1583:                break
                   1584:        fi
                   1585:
                   1586:        rm -f ttyA$unit[0-7] dtyA$unit[0-7]
                   1587:        for j in 0 1 2 3 4 5 6 7
                   1588:        do
                   1589:                mknod ttyA$unit$j c %clcd_chr% $(($unit * 8 + $j + $dialin))
                   1590:                mknod dtyA$unit$j c %clcd_chr% $(($unit * 8 + $j + $dialout))
                   1591:        done
                   1592:        chown uucp ttyA$unit[0-9a-f] dtyA$unit[0-9a-f]
                   1593:
                   1594:        ;;
                   1595:
                   1596: bpp*)
                   1597:        unit=${i#bpp}
                   1598:        rm -f bpp$unit
                   1599:        mknod bpp$unit c %bpp_chr% $(($unit + 0))
                   1600:        chmod 600 bpp$unit
                   1601:        ;;
                   1602:
                   1603: tctrl*)
                   1604:        unit=${i#tctrl}
                   1605:        rm -f tctrl$unit
                   1606:        mknod tctrl$unit c %tctrl_chr% $unit
                   1607:        chmod 666 tctrl$unit
                   1608:        ;;
                   1609:
                   1610: bmd*)
                   1611:        unit=${i#bmd}; blk=%bmd_blk%; chr=%bmd_chr%
                   1612:        rm -f bmd${unit}? rbmd${unit}?
                   1613:        mknod bmd${unit}a  b $blk $(($unit * 8 + 0))
                   1614:        mknod bmd${unit}c  b $blk $(($unit * 8 + 2))
                   1615:        mknod rbmd${unit}a c $chr $(($unit * 8 + 0))
                   1616:        mknod rbmd${unit}c c $chr $(($unit * 8 + 2))
                   1617:        chgrp operator bmd${unit}? rbmd${unit}?
                   1618:        chmod 640 bmd${unit}? rbmd${unit}?
                   1619:        ;;
                   1620:
                   1621: sram)
                   1622:        rm -f sram
                   1623:        mknod sram c %sram_chr% 0
                   1624:        chmod 644 sram
                   1625:        ;;
                   1626:
                   1627: pow*)
                   1628:        unit=${i#pow}
                   1629:        rm -f pow${unit}
                   1630:        case $unit in
                   1631:        0|1)
                   1632:                mknod pow${unit} c %pow_chr% ${unit}
                   1633:                chmod 644 pow${unit}
                   1634:                if [ $unit = 0 ]
                   1635:                then
                   1636:                        ln -fs pow${unit} pow
                   1637:                fi
                   1638:                ;;
                   1639:        *)
                   1640:                echo bad unit for pow in: $i
                   1641:                ;;
                   1642:        esac
                   1643:        ;;
                   1644:
                   1645: ttyS*)
                   1646:        unit=${i#ttyS}
                   1647:        rm -f ttyS$unit dtyS$unit
                   1648:        mknod ttyS$unit c %sacom_chr% $(($unit + $dialin ))
                   1649:        mknod dtyS$unit c %sacom_chr% $(($unit + $dialout))
                   1650:        chown uucp ttyS$unit dtyS$unit
                   1651:        ;;
                   1652:
                   1653: midevend)
                   1654: %MI_DEVICES_END%
                   1655: local)
                   1656:        if [ -f "$0.local" ]; then
                   1657:                umask 0
                   1658:                sh $0.local all
                   1659:                umask 077
                   1660:        fi
                   1661:        ;;
                   1662:
                   1663: *)
                   1664:        echo $i: unknown device
                   1665:        ;;
                   1666:
                   1667: esac
                   1668: done
                   1669:
                   1670: }
                   1671:
                   1672: # three variants of disk partitions - max 8, max 16, max 16 with highpartoffset
1.3       jdolecek 1673: # hack; only the one used by port is retained in final MAKEDEV script
1.1       jdolecek 1674: # routine is called as:
                   1675: # makedisk name unit blk chr
                   1676: makedisk_p8() {
                   1677:        name="$1"; unit="$2"; blk="$3"; chr="$4"
                   1678:
                   1679:        rm -f $name$unit? r$name$unit?
                   1680:        mknod ${name}${unit}a   b $blk $(($unit * 8 + 0))
                   1681:        mknod ${name}${unit}b   b $blk $(($unit * 8 + 1))
                   1682:        mknod ${name}${unit}c   b $blk $(($unit * 8 + 2))
                   1683:        mknod ${name}${unit}d   b $blk $(($unit * 8 + 3))
                   1684:        mknod ${name}${unit}e   b $blk $(($unit * 8 + 4))
                   1685:        mknod ${name}${unit}f   b $blk $(($unit * 8 + 5))
                   1686:        mknod ${name}${unit}g   b $blk $(($unit * 8 + 6))
                   1687:        mknod ${name}${unit}h   b $blk $(($unit * 8 + 7))
                   1688:        mknod r${name}${unit}a  c $chr $(($unit * 8 + 0))
                   1689:        mknod r${name}${unit}b  c $chr $(($unit * 8 + 1))
                   1690:        mknod r${name}${unit}c  c $chr $(($unit * 8 + 2))
                   1691:        mknod r${name}${unit}d  c $chr $(($unit * 8 + 3))
                   1692:        mknod r${name}${unit}e  c $chr $(($unit * 8 + 4))
                   1693:        mknod r${name}${unit}f  c $chr $(($unit * 8 + 5))
                   1694:        mknod r${name}${unit}g  c $chr $(($unit * 8 + 6))
                   1695:        mknod r${name}${unit}h  c $chr $(($unit * 8 + 7))
                   1696:        chgrp operator $name$unit? r$name$unit?
                   1697:        chmod 640 $name$unit? r$name$unit?
                   1698: }
                   1699: makedisk_p16() {
                   1700:        name="$1"; unit="$2"; blk="$3"; chr="$4"
                   1701:
                   1702:        rm -f $name$unit? r$name$unit?
                   1703:        mknod ${name}${unit}a   b $blk $(($unit * 16 + 0))
                   1704:        mknod ${name}${unit}b   b $blk $(($unit * 16 + 1))
                   1705:        mknod ${name}${unit}c   b $blk $(($unit * 16 + 2))
                   1706:        mknod ${name}${unit}d   b $blk $(($unit * 16 + 3))
                   1707:        mknod ${name}${unit}e   b $blk $(($unit * 16 + 4))
                   1708:        mknod ${name}${unit}f   b $blk $(($unit * 16 + 5))
                   1709:        mknod ${name}${unit}g   b $blk $(($unit * 16 + 6))
                   1710:        mknod ${name}${unit}h   b $blk $(($unit * 16 + 7))
                   1711:        mknod ${name}${unit}i   b $blk $(($unit * 16 + 8))
                   1712:        mknod ${name}${unit}j   b $blk $(($unit * 16 + 9))
                   1713:        mknod ${name}${unit}k   b $blk $(($unit * 16 + 10))
                   1714:        mknod ${name}${unit}l   b $blk $(($unit * 16 + 11))
                   1715:        mknod ${name}${unit}m   b $blk $(($unit * 16 + 12))
                   1716:        mknod ${name}${unit}n   b $blk $(($unit * 16 + 13))
                   1717:        mknod ${name}${unit}o   b $blk $(($unit * 16 + 14))
                   1718:        mknod ${name}${unit}p   b $blk $(($unit * 16 + 15))
                   1719:        mknod r${name}${unit}a  c $chr $(($unit * 16 + 0))
                   1720:        mknod r${name}${unit}b  c $chr $(($unit * 16 + 1))
                   1721:        mknod r${name}${unit}c  c $chr $(($unit * 16 + 2))
                   1722:        mknod r${name}${unit}d  c $chr $(($unit * 16 + 3))
                   1723:        mknod r${name}${unit}e  c $chr $(($unit * 16 + 4))
                   1724:        mknod r${name}${unit}f  c $chr $(($unit * 16 + 5))
                   1725:        mknod r${name}${unit}g  c $chr $(($unit * 16 + 6))
                   1726:        mknod r${name}${unit}h  c $chr $(($unit * 16 + 7))
                   1727:        mknod r${name}${unit}i  c $chr $(($unit * 16 + 8))
                   1728:        mknod r${name}${unit}j  c $chr $(($unit * 16 + 9))
                   1729:        mknod r${name}${unit}k  c $chr $(($unit * 16 + 10))
                   1730:        mknod r${name}${unit}l  c $chr $(($unit * 16 + 11))
                   1731:        mknod r${name}${unit}m  c $chr $(($unit * 16 + 12))
                   1732:        mknod r${name}${unit}n  c $chr $(($unit * 16 + 13))
                   1733:        mknod r${name}${unit}o  c $chr $(($unit * 16 + 14))
                   1734:        mknod r${name}${unit}p  c $chr $(($unit * 16 + 15))
                   1735:        chgrp operator $name$unit? r$name$unit?
                   1736:        chmod 640 $name$unit? r$name$unit?
                   1737: }
                   1738: makedisk_p16high() {
                   1739:        highpartoffset=524280   # offset for partition 9 to 16
                   1740:        name="$1"; unit="$2"; blk="$3"; chr="$4"
                   1741:
                   1742:        rm -f $name$unit? r$name$unit?
                   1743:        mknod ${name}${unit}a   b $blk $(($unit * 8 + 0))
                   1744:        mknod ${name}${unit}b   b $blk $(($unit * 8 + 1))
                   1745:        mknod ${name}${unit}c   b $blk $(($unit * 8 + 2))
                   1746:        mknod ${name}${unit}d   b $blk $(($unit * 8 + 3))
                   1747:        mknod ${name}${unit}e   b $blk $(($unit * 8 + 4))
                   1748:        mknod ${name}${unit}f   b $blk $(($unit * 8 + 5))
                   1749:        mknod ${name}${unit}g   b $blk $(($unit * 8 + 6))
                   1750:        mknod ${name}${unit}h   b $blk $(($unit * 8 + 7))
                   1751:        mknod ${name}${unit}i   b $blk $(($unit * 8 + $highpartoffset + 8))
                   1752:        mknod ${name}${unit}j   b $blk $(($unit * 8 + $highpartoffset + 9))
                   1753:        mknod ${name}${unit}k   b $blk $(($unit * 8 + $highpartoffset + 10))
                   1754:        mknod ${name}${unit}l   b $blk $(($unit * 8 + $highpartoffset + 11))
                   1755:        mknod ${name}${unit}m   b $blk $(($unit * 8 + $highpartoffset + 12))
                   1756:        mknod ${name}${unit}n   b $blk $(($unit * 8 + $highpartoffset + 13))
                   1757:        mknod ${name}${unit}o   b $blk $(($unit * 8 + $highpartoffset + 14))
                   1758:        mknod ${name}${unit}p   b $blk $(($unit * 8 + $highpartoffset + 15))
                   1759:        mknod r${name}${unit}a  c $chr $(($unit * 8 + 0))
                   1760:        mknod r${name}${unit}b  c $chr $(($unit * 8 + 1))
                   1761:        mknod r${name}${unit}c  c $chr $(($unit * 8 + 2))
                   1762:        mknod r${name}${unit}d  c $chr $(($unit * 8 + 3))
                   1763:        mknod r${name}${unit}e  c $chr $(($unit * 8 + 4))
                   1764:        mknod r${name}${unit}f  c $chr $(($unit * 8 + 5))
                   1765:        mknod r${name}${unit}g  c $chr $(($unit * 8 + 6))
                   1766:        mknod r${name}${unit}h  c $chr $(($unit * 8 + 7))
                   1767:        mknod r${name}${unit}i  c $chr $(($unit * 8 + $highpartoffset + 8))
                   1768:        mknod r${name}${unit}j  c $chr $(($unit * 8 + $highpartoffset + 9))
                   1769:        mknod r${name}${unit}k  c $chr $(($unit * 8 + $highpartoffset + 10))
                   1770:        mknod r${name}${unit}l  c $chr $(($unit * 8 + $highpartoffset + 11))
                   1771:        mknod r${name}${unit}m  c $chr $(($unit * 8 + $highpartoffset + 12))
                   1772:        mknod r${name}${unit}n  c $chr $(($unit * 8 + $highpartoffset + 13))
                   1773:        mknod r${name}${unit}o  c $chr $(($unit * 8 + $highpartoffset + 14))
                   1774:        mknod r${name}${unit}p  c $chr $(($unit * 8 + $highpartoffset + 15))
1.4       jdolecek 1775:        chgrp operator $name$unit? r$name$unit?
                   1776:        chmod 640 $name$unit? r$name$unit?
                   1777: }
                   1778:
                   1779: # make only the very few basic disk device nodes - 'a' partition
                   1780: # and raw partition
                   1781: makedisk_minimal() {
                   1782:        name=$1; unit=$2; blk=$3; chr=$4
                   1783:        doff=%DISKMINOROFFSET%
                   1784:        ro=%RAWDISK_OFF%; rn=%RAWDISK_NAME%
                   1785:
                   1786:        rm -f $name$unit? r$name$unit?
                   1787:        mknod ${name}${unit}a           b $blk $(($unit * $doff + 0))
                   1788:        mknod ${name}${unit}$rn         b $blk $(($unit * $doff + $ro))
                   1789:        mknod r${name}${unit}a          c $chr $(($unit * $doff + 0))
                   1790:        mknod r${name}${unit}$rn        c $chr $(($unit * $doff + $ro))
1.1       jdolecek 1791:        chgrp operator $name$unit? r$name$unit?
                   1792:        chmod 640 $name$unit? r$name$unit?
                   1793: }
                   1794:
                   1795: makedev $*

CVSweb <webmaster@jp.NetBSD.org>