Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc/etc.cats Add in the changes tls%netbsd.org@localhost made to all t...



details:   https://anonhg.NetBSD.org/src/rev/90709459a939
branches:  trunk
changeset: 522104:90709459a939
user:      skrll <skrll%NetBSD.org@localhost>
date:      Mon Feb 11 15:57:54 2002 +0000

description:
Add in the changes tls%netbsd.org@localhost made to all the other ports recently.

diffstat:

 etc/etc.cats/MAKEDEV |  81 +++++++++++++++++++++++++++------------------------
 1 files changed, 43 insertions(+), 38 deletions(-)

diffs (134 lines):

diff -r da8040c4ba95 -r 90709459a939 etc/etc.cats/MAKEDEV
--- a/etc/etc.cats/MAKEDEV      Mon Feb 11 15:20:23 2002 +0000
+++ b/etc/etc.cats/MAKEDEV      Mon Feb 11 15:57:54 2002 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#      $NetBSD: MAKEDEV,v 1.2 2002/02/11 14:57:33 augustss Exp $
+#      $NetBSD: MAKEDEV,v 1.3 2002/02/11 15:57:54 skrll Exp $
 #
 # Copyright (c) 1990 The Regents of the University of California.
 # All rights reserved.
@@ -70,7 +70,8 @@
 #      fcom    DC21285 COM port
 #
 # Pseudo terminals:
-#      pty*    set of 16 master and slave pseudo terminals
+#      pty*    set of 62 master and slave pseudo terminals
+#      opty    first 16 ptys, to save inodes on install media
 #
 # Printers:
 #      lpt*    stock lp
@@ -126,15 +127,15 @@
 case $i in
 
 all)
-       sh $0 std fd fd0 fd1 wd0 wd1 wd2 wd3 md0 md1 sd0 sd1 sd2 sd3
-       sh $0 tty0 tty1 pty0 pty1 pty2 pty3 st0 st1 ch0 cd0 cd1 vnd0 vnd1
+       sh $0 std wscons fd fd0 fd1 wd0 wd1 wd2 wd3 md0 md1 sd0 sd1 sd2 sd3
+       sh $0 tty0 tty1 pty0 st0 st1 ch0 cd0 cd1 vnd0 vnd1
        sh $0 ccd0 ccd1 uk0 uk1 ss0
        sh $0 raid0 raid1 raid2 raid3 raid4 raid5 raid6 raid7
        sh $0 ttyv0
        sh $0 bpf0 bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7
        sh $0 lpa0 lpt0 tun0 tun1 tun2 ipl
        sh $0 lkm qms0 pms0 local
-       sh $0 usbs wscons isdn
+       sh $0 usbs isdn
        sh $0 mouse-qms0 random
        sh $0 music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7
        sh $0 scsibus0 scsibus1 scsibus2 scsibus3
@@ -143,7 +144,7 @@
 
 ramdisk|floppy)
        sh $0 std fd0 fd1 wd0 wd1 wd2 wd3 md0 md1 sd0 sd1 sd2 sd3
-       sh $0 tty0 tty1 pty0 ttyv0
+       sh $0 tty0 tty1 opty ttyv0
        sh $0 st0 st1 cd0 cd1
        ;;
 
@@ -368,48 +369,52 @@
        chmod 600 $fcom
        ;;
 
+opty)
+       rm -f ttyp[0-9a-f] ptyp[0-9a-f]
+       for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f
+       do
+               case $j in
+               [0-9])  jn=$j ;;
+               a)      jn=10 ;;
+               b)      jn=11 ;;
+               c)      jn=12 ;;
+               d)      jn=13 ;;
+               e)      jn=14 ;;
+               f)      jn=15 ;;
+               esac
+               mknod ttyp$j c 7 $jn
+               mknod ptyp$j c 6 $jn
+       done
+       chgrp wheel ttyp[0-9a-f] ptyp[0-9a-f]
+       chmod 666 ttyp[0-9a-f] ptyp[0-9a-f] 
+       ;;
+               
 pty*)
        class=${i#pty}
-       case $class in
-       0)      name=p;;
-       1)      name=q;;
-       2)      name=r;;
-       3)      name=s;;
-       4)      name=t;;
-       5)      name=u;;
-       6)      name=v
-               echo "$0: $i: pty unit conflicts with console ttyv* devices."
+       name=`echo pqrstuvwxyzPQRST | dd bs=1 count=1 skip=$class 2>/dev/null`
+       case $name in
+       v)      echo "$0: $i: pty unit conflicts with console ttyv0 device."
                continue;;
-       7)      name=w;;
-       8)      name=x;;
-       9)      name=y;;
-       10)     name=z;;
-       11)     name=P;;
-       12)     name=Q;;
-       13)     name=R;;
-       14)     name=S;;
-       15)     name=T;;
+       ?)      ;;
        *)      echo "$0: $i: pty unit must be between 0 and 15"
                continue ;;
        esac
-       rm -f tty$name[0-9a-f] pty$name[0-9a-f]
-       for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f
+       rm -f tty$name[0-9a-zA-Z] pty$name[0-9a-zA-Z]
+       jn=0
+       while [ $jn -lt 62 ]
        do
-               case $j in
-               [0-9])  jn=$j ;;
-               a)      jn=10 ;;
-               b)      jn=11 ;;
-               c)      jn=12 ;;
-               d)      jn=13 ;;
-               e)      jn=14 ;;
-               f)      jn=15 ;;
-               esac
-               unit=$(($class * 16 + $jn))
+               j=`echo 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ | dd bs=1 count=1 skip=$jn 2>/dev/null`
+               skip=0
+               if [ $jn -ge 16 ]; then
+                       skip=$(($class * 30 + 256 - 16))
+               fi
+               unit=$(($class * 62 + $jn + $skip))
                mknod tty$name$j c 7 $unit
                mknod pty$name$j c 6 $unit
+               jn=$(($jn + 1))
        done
-        chgrp wheel tty$name? pty$name?
-        chmod 666 tty$name? pty$name?
+        chgrp wheel tty$name[0-9a-zA-Z] pty$name[0-9a-zA-Z]
+        chmod 666 tty$name[0-9a-zA-Z] pty$name[0-9a-zA-Z]
        ;;
 
 st*)



Home | Main Index | Thread Index | Old Index