diff --git a/etc/etc.alpha/MAKEDEV b/etc/etc.alpha/MAKEDEV index 26b5b6177003..9b19f00d61f0 100644 --- a/etc/etc.alpha/MAKEDEV +++ b/etc/etc.alpha/MAKEDEV @@ -1,5 +1,5 @@ #!/bin/sh - -# $NetBSD: MAKEDEV,v 1.18 1997/07/22 23:13:05 phil Exp $ +# $NetBSD: MAKEDEV,v 1.19 1997/07/23 01:29:36 phil Exp $ # # Copyright (c) 1990 The Regents of the University of California. # All rights reserved. @@ -167,30 +167,50 @@ ttyB*|ttyC*|ttyE*) ;; pty*) - class=`expr $i : 'pty\(.*\)'` + class=${i#pty} case $class in - 0) offset=0 name=p;; - 1) offset=16 name=q;; - 2) offset=32 name=r;; - 3) offset=48 name=s;; -# Note that telnetd, rlogind, and xterm (at least) only look at p-s. - 4) offset=64 name=t;; - *) echo bad unit for pty in: $i;; - esac - case $class in - 0|1|2|3|4) - umask 0 - eval `echo $offset $name | awk ' { b=$1; n=$2 } END { - for (i = 0; i < 16; i++) - printf("rm -f tty%s%x; mknod tty%s%x c 4 %d; \ - rm -f pty%s%x; mknod pty%s%x c 5 %d; ", \ - n, i, n, i, b+i, n, i, n, i, b+i); }'` - umask 77 - if [ $class = 1 ]; then - mv ttyqf ttyv0; mv ptyqf ptyv0 - fi - ;; + 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 another use." + 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 + 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)) + mknod tty$name$j c 4 $unit + mknod pty$name$j c 5 $unit + done + chgrp wheel tty$name? pty$name? + chmod 666 tty$name? pty$name? + if [ $class = 1 ]; then + mv ttyqf ttyv0; mv ptyqf ptyv0 + fi ;; st*) @@ -311,6 +331,7 @@ satlink*) rm -f satlink$unit mknod satlink$unit c 38 $unit chmod 444 satlink$unit + ;; local) umask 0 diff --git a/etc/etc.amiga/MAKEDEV b/etc/etc.amiga/MAKEDEV index 51a51d7c4ef5..2a7393f38943 100644 --- a/etc/etc.amiga/MAKEDEV +++ b/etc/etc.amiga/MAKEDEV @@ -1,6 +1,6 @@ #!/bin/sh - # -# $NetBSD: MAKEDEV,v 1.29 1997/07/22 23:13:09 phil Exp $ +# $NetBSD: MAKEDEV,v 1.30 1997/07/23 01:29:39 phil Exp $ # # Copyright (c) 1990 The Regents of the University of California. # All rights reserved. @@ -366,25 +366,43 @@ view*) pty*) class=${i#pty} case $class in - 0) offset=0 name=p;; - 1) offset=16 name=q;; - 2) offset=32 name=r;; - 3) offset=48 name=s;; -# Note that telnetd, rlogind, and xterm (at least) only look at p-s. - 4) offset=64 name=t;; - *) echo bad unit for pty in: $i;; - esac - case $class in - 0|1|2|3|4) - umask 0 - eval `echo $offset $name | awk ' { b=$1; n=$2 } END { - for (i = 0; i < 16; i++) - printf("rm -f tty%s%x; mknod tty%s%x c 4 %d; \ - rm -f pty%s%x; mknod pty%s%x c 5 %d; ", \ - n, i, n, i, b+i, n, i, n, i, b+i); }'` - umask 77 - ;; + 0) name=p;; + 1) name=q;; + 2) name=r;; + 3) name=s;; + 4) name=t;; + 5) name=u;; + 6) name=v;; + 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 + 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)) + mknod tty$name$j c 4 $unit + mknod pty$name$j c 5 $unit + done + chgrp wheel tty$name? pty$name? + chmod 666 tty$name? pty$name? ;; bpf*|tun*) diff --git a/etc/etc.arm32/MAKEDEV b/etc/etc.arm32/MAKEDEV index d3ca8f782d10..25dfc2103e03 100644 --- a/etc/etc.arm32/MAKEDEV +++ b/etc/etc.arm32/MAKEDEV @@ -1,6 +1,6 @@ #!/bin/sh - # -# $NetBSD: MAKEDEV,v 1.10 1997/07/22 23:13:11 phil Exp $ +# $NetBSD: MAKEDEV,v 1.11 1997/07/23 01:29:41 phil Exp $ # # Copyright (c) 1990 The Regents of the University of California. # All rights reserved. @@ -185,25 +185,43 @@ tty*) pty*) class=${i#pty} case $class in - 0) offset=0 name=p;; - 1) offset=16 name=q;; - 2) offset=32 name=r;; - 3) offset=48 name=s;; -# Note that telnetd, rlogind, and xterm (at least) only look at p-s. - 4) offset=64 name=t;; - *) echo bad unit for pty in: $i;; - esac - case $class in - 0|1|2|3|4) - umask 0 - eval `echo $offset $name | awk ' { b=$1; n=$2 } END { - for (i = 0; i < 16; i++) - printf("rm -f tty%s%x; mknod tty%s%x c 7 %d; \ - rm -f pty%s%x; mknod pty%s%x c 6 %d; ", \ - n, i, n, i, b+i, n, i, n, i, b+i); }'` - umask 77 - ;; + 0) name=p;; + 1) name=q;; + 2) name=r;; + 3) name=s;; + 4) name=t;; + 5) name=u;; + 6) name=v;; + 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 + 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)) + mknod tty$name$j c 7 $unit + mknod pty$name$j c 6 $unit + done + chgrp wheel tty$name? pty$name? + chmod 666 tty$name? pty$name? ;; st*) diff --git a/etc/etc.atari/MAKEDEV b/etc/etc.atari/MAKEDEV index ac7791ef82e5..965747cc8308 100644 --- a/etc/etc.atari/MAKEDEV +++ b/etc/etc.atari/MAKEDEV @@ -1,6 +1,6 @@ #!/bin/sh - # -# $NetBSD: MAKEDEV,v 1.18 1997/07/22 23:13:13 phil Exp $ +# $NetBSD: MAKEDEV,v 1.19 1997/07/23 01:29:43 phil Exp $ # # Copyright (c) 1990 The Regents of the University of California. # All rights reserved. @@ -383,27 +383,43 @@ view*) pty*) class=${i#pty} case $class in - 0) offset=0 name=p;; - 1) offset=16 name=q;; - 2) offset=32 name=r;; - 3) offset=48 name=s;; -# Note that telnetd, rlogind, and xterm (at least) only look at p-s. - 4) offset=64 name=t;; - *) echo bad unit for pty in: $i;; - esac - case $class in - 0|1|2|3|4) - umask 0 - (i=0; while [ $i -lt 16 ]; do - eval `printf "rm -f tty%s%x; mknod tty%s%x c 4 %d; \ - rm -f pty%s%x; mknod pty%s%x c 5 %d" $name $i \ - $name $i $offset $name $i $name $i $offset` - offset=$(($offset+1)) - i=$(($i+1)) - done) - umask 77 - ;; + 0) name=p;; + 1) name=q;; + 2) name=r;; + 3) name=s;; + 4) name=t;; + 5) name=u;; + 6) name=v;; + 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 + 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)) + mknod tty$name$j c 4 $unit + mknod pty$name$j c 5 $unit + done + chgrp wheel tty$name? pty$name? + chmod 666 tty$name? pty$name? ;; lpt*) diff --git a/etc/etc.hp300/MAKEDEV b/etc/etc.hp300/MAKEDEV index 19496e228764..37940321c847 100644 --- a/etc/etc.hp300/MAKEDEV +++ b/etc/etc.hp300/MAKEDEV @@ -1,6 +1,6 @@ #!/bin/sh - # -# $NetBSD: MAKEDEV,v 1.18 1997/07/22 23:13:16 phil Exp $ +# $NetBSD: MAKEDEV,v 1.19 1997/07/23 01:29:45 phil Exp $ # # Copyright (c) 1990 The Regents of the University of California. # All rights reserved. @@ -324,29 +324,48 @@ ipl) pty*) class=${i#pty} case $class in - 0) offset=0 name=p;; - 1) offset=16 name=q;; - 2) offset=32 name=r;; - 3) offset=48 name=s;; -# Note that telnetd, rlogind, and xterm (at least) only look at p-s. - 4) offset=64 name=t;; - *) echo bad unit for pty in: $i;; - esac - case $class in - 0|1|2|3|4) - umask 0 - eval `echo $offset $name | awk ' { b=$1; n=$2 } END { - for (i = 0; i < 16; i++) - printf("rm -f tty%s%x pty%s%x; \ - mknod tty%s%x c 4 %d; \ - mknod pty%s%x c 5 %d; ", \ - n, i, n, i, n, i, b+i, n, i, b+i); }'` - umask 77 - if [ $class = 1 ]; then - mv ttyqf ttyv0; mv ptyqf ptyv0 - fi - ;; + 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 another use." + 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 + 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)) + mknod tty$name$j c 4 $unit + mknod pty$name$j c 5 $unit + done + chgrp wheel tty$name? pty$name? + chmod 666 tty$name? pty$name? + if [ $class = 1 ]; then + mv ttyqf ttyv0; mv ptyqf ptyv0 + fi ;; local) diff --git a/etc/etc.i386/MAKEDEV b/etc/etc.i386/MAKEDEV index 4c9dcb997d9e..0c3c29b9f571 100644 --- a/etc/etc.i386/MAKEDEV +++ b/etc/etc.i386/MAKEDEV @@ -1,6 +1,6 @@ #!/bin/sh - # -# $NetBSD: MAKEDEV,v 1.53 1997/07/22 23:13:18 phil Exp $ +# $NetBSD: MAKEDEV,v 1.54 1997/07/23 01:29:47 phil Exp $ # # Copyright (c) 1990 The Regents of the University of California. # All rights reserved. @@ -226,49 +226,45 @@ com*|tty*) # (XXX -- com should die) pty*) class=${i#pty} case $class in - 0) offset=0 name=p;; - 1) offset=16 name=q;; - 2) offset=32 name=r;; - 3) offset=48 name=s;; -# Note that telnetd, rlogind, and xterm (at least) only look at p-s. - 4) offset=64 name=t;; - *) echo bad unit for pty in: $i;; + 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." + 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? pty$name? - mknod tty${name}0 c 5 $(($offset + 0)) - mknod tty${name}1 c 5 $(($offset + 1)) - mknod tty${name}2 c 5 $(($offset + 2)) - mknod tty${name}3 c 5 $(($offset + 3)) - mknod tty${name}4 c 5 $(($offset + 4)) - mknod tty${name}5 c 5 $(($offset + 5)) - mknod tty${name}6 c 5 $(($offset + 6)) - mknod tty${name}7 c 5 $(($offset + 7)) - mknod tty${name}8 c 5 $(($offset + 8)) - mknod tty${name}9 c 5 $(($offset + 9)) - mknod tty${name}a c 5 $(($offset + 10)) - mknod tty${name}b c 5 $(($offset + 11)) - mknod tty${name}c c 5 $(($offset + 12)) - mknod tty${name}d c 5 $(($offset + 13)) - mknod tty${name}e c 5 $(($offset + 14)) - mknod tty${name}f c 5 $(($offset + 15)) - mknod pty${name}0 c 6 $(($offset + 0)) - mknod pty${name}1 c 6 $(($offset + 1)) - mknod pty${name}2 c 6 $(($offset + 2)) - mknod pty${name}3 c 6 $(($offset + 3)) - mknod pty${name}4 c 6 $(($offset + 4)) - mknod pty${name}5 c 6 $(($offset + 5)) - mknod pty${name}6 c 6 $(($offset + 6)) - mknod pty${name}7 c 6 $(($offset + 7)) - mknod pty${name}8 c 6 $(($offset + 8)) - mknod pty${name}9 c 6 $(($offset + 9)) - mknod pty${name}a c 6 $(($offset + 10)) - mknod pty${name}b c 6 $(($offset + 11)) - mknod pty${name}c c 6 $(($offset + 12)) - mknod pty${name}d c 6 $(($offset + 13)) - mknod pty${name}e c 6 $(($offset + 14)) - mknod pty${name}f c 6 $(($offset + 15)) - chgrp wheel tty$name? pty$name? - chmod 666 tty$name? pty$name? + 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 + 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)) + mknod tty$name$j c 5 $unit + mknod pty$name$j c 6 $unit + done + chgrp wheel tty$name? pty$name? + chmod 666 tty$name? pty$name? ;; st*) diff --git a/etc/etc.mac68k/MAKEDEV b/etc/etc.mac68k/MAKEDEV index 823fd39cfc59..3949ad9363a2 100644 --- a/etc/etc.mac68k/MAKEDEV +++ b/etc/etc.mac68k/MAKEDEV @@ -20,7 +20,7 @@ # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. # # from: @(#)MAKEDEV 5.2 (Berkeley) 6/22/90 -# $NetBSD: MAKEDEV,v 1.27 1997/07/22 23:13:20 phil Exp $ +# $NetBSD: MAKEDEV,v 1.28 1997/07/23 01:29:49 phil Exp $ # # Device "make" file. Valid arguments: # all a smattering--at least one of each except @@ -200,25 +200,43 @@ tty*) pty*) class=${i#pty} case $class in - 0) offset=0 name=p;; - 1) offset=16 name=q;; - 2) offset=32 name=r;; - 3) offset=48 name=s;; -# Note that telnetd, rlogind, and xterm (at least) only look at p-s. - 4) offset=64 name=t;; - *) echo bad unit for pty in: $i;; - esac - case $class in - 0|1|2|3|4) - umask 0 - eval `echo $offset $name | awk ' { b=$1; n=$2 } END { - for (i = 0; i < 16; i++) - printf("rm -f tty%s%x; mknod tty%s%x c 4 %d; \ - rm -f pty%s%x; mknod pty%s%x c 5 %d; ", \ - n, i, n, i, b+i, n, i, n, i, b+i); }'` - umask 77 - ;; + 0) name=p;; + 1) name=q;; + 2) name=r;; + 3) name=s;; + 4) name=t;; + 5) name=u;; + 6) name=v;; + 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 + 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)) + mknod tty$name$j c 4 $unit + mknod pty$name$j c 5 $unit + done + chgrp wheel tty$name? pty$name? + chmod 666 tty$name? pty$name? ;; st*) diff --git a/etc/etc.mvme68k/MAKEDEV b/etc/etc.mvme68k/MAKEDEV index 67bc4fa38a12..10c1fd8336fc 100755 --- a/etc/etc.mvme68k/MAKEDEV +++ b/etc/etc.mvme68k/MAKEDEV @@ -1,6 +1,6 @@ #!/bin/sh - # -# $NetBSD: MAKEDEV,v 1.8 1997/07/22 23:13:24 phil Exp $ +# $NetBSD: MAKEDEV,v 1.9 1997/07/23 01:29:50 phil Exp $ # # Copyright (c) 1990 The Regents of the University of California. # All rights reserved. @@ -153,25 +153,43 @@ ccd*|sd*|vnd*) pty*) class=${i#pty} case $class in - 0) offset=0 name=p;; - 1) offset=16 name=q;; - 2) offset=32 name=r;; - 3) offset=48 name=s;; -# Note that telnetd, rlogind, and xterm (at least) only look at p-s. - 4) offset=64 name=t;; - *) echo bad unit for pty in: $i;; - esac - case $class in - 0|1|2|3|4) - umask 0 - eval `echo $offset $name | awk ' { b=$1; n=$2 } END { - for (i = 0; i < 16; i++) - printf("rm -f tty%s%x; mknod tty%s%x c 4 %d; \ - rm -f pty%s%x; mknod pty%s%x c 5 %d; ", \ - n, i, n, i, b+i, n, i, n, i, b+i); }'` - umask 77 - ;; + 0) name=p;; + 1) name=q;; + 2) name=r;; + 3) name=s;; + 4) name=t;; + 5) name=u;; + 6) name=v;; + 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 + 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)) + mknod tty$name$j c 4 $unit + mknod pty$name$j c 5 $unit + done + chgrp wheel tty$name? pty$name? + chmod 666 tty$name? pty$name? ;; st*) diff --git a/etc/etc.pc532/MAKEDEV b/etc/etc.pc532/MAKEDEV index 209a9f1d0d77..99f921de11a0 100644 --- a/etc/etc.pc532/MAKEDEV +++ b/etc/etc.pc532/MAKEDEV @@ -1,6 +1,6 @@ #!/bin/sh - # -# $NetBSD: MAKEDEV,v 1.14 1997/07/22 23:13:26 phil Exp $ +# $NetBSD: MAKEDEV,v 1.15 1997/07/23 01:29:52 phil Exp $ # # Copyright (c) 1990 The Regents of the University of California. # All rights reserved. @@ -23,6 +23,8 @@ # # @(#)MAKEDEV 5.2 (Berkeley) 6/22/90 # +# PC532 MAKEDEV +# # Device "make" file. Valid arguments: # all makes all known devices, including local devices. # Tries to make the 'standard' number of each type. @@ -169,25 +171,43 @@ tty*) pty*) class=${i#pty} case $class in - 0) offset=0 name=p;; - 1) offset=16 name=q;; - 2) offset=32 name=r;; - 3) offset=48 name=s;; -# Note that telnetd, rlogind, and xterm (at least) only look at p-s. - 4) offset=64 name=t;; - *) echo bad unit for pty in: $i;; - esac - case $class in - 0|1|2|3|4) - umask 0 - eval `echo $offset $name | awk ' { b=$1; n=$2 } END { - for (i = 0; i < 16; i++) - printf("rm -f tty%s%x; mknod tty%s%x c 5 %d; \ - rm -f pty%s%x; mknod pty%s%x c 6 %d; ", \ - n, i, n, i, b+i, n, i, n, i, b+i); }'` - umask 77 - ;; + 0) name=p;; + 1) name=q;; + 2) name=r;; + 3) name=s;; + 4) name=t;; + 5) name=u;; + 6) name=v;; + 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 + 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)) + mknod tty$name$j c 5 $unit + mknod pty$name$j c 6 $unit + done + chgrp wheel tty$name? pty$name? + chmod 666 tty$name? pty$name? ;; st*) diff --git a/etc/etc.pmax/MAKEDEV b/etc/etc.pmax/MAKEDEV index f84f2f1b9381..4fb93d20152b 100644 --- a/etc/etc.pmax/MAKEDEV +++ b/etc/etc.pmax/MAKEDEV @@ -1,6 +1,6 @@ #!/bin/sh - # -# $NetBSD: MAKEDEV,v 1.8 1997/07/22 23:13:31 phil Exp $ +# $NetBSD: MAKEDEV,v 1.9 1997/07/23 01:29:54 phil Exp $ # # from: @(#)MAKEDEV 8.1 (Berkeley) 6/9/93 # @@ -248,28 +248,48 @@ mfb*) pty*) class=`expr $i : 'pty\(.*\)'` case $class in - 0) offset=0 name=p;; - 1) offset=16 name=q;; - 2) offset=32 name=r;; - 3) offset=48 name=s;; -# Note that telnetd, rlogind, and xterm (at least) only look at p-s. - 4) offset=64 name=t;; - *) echo bad unit for pty in: $i;; - esac - case $class in - 0|1|2|3|4) - umask 0 - eval `echo $offset $name | awk ' { b=$1; n=$2 } END { - for (i = 0; i < 16; i++) - printf("mknod tty%s%x c 4 %d; \ - mknod pty%s%x c 5 %d; ", \ - n, i, b+i, n, i, b+i); }'` - umask 77 - if [ $class = 1 ]; then - mv ttyqf ttyv0; mv ptyqf ptyv0 - fi - ;; + 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 another use." + 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 + 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)) + mknod tty$name$j c 4 $unit + mknod pty$name$j c 5 $unit + done + chgrp wheel tty$name? pty$name? + chmod 666 tty$name? pty$name? + if [ $class = 1 ]; then + mv ttyqf ttyv0; mv ptyqf ptyv0 + fi ;; ipl) diff --git a/etc/etc.sparc/MAKEDEV b/etc/etc.sparc/MAKEDEV index 31a242736958..8a3c10dafb88 100644 --- a/etc/etc.sparc/MAKEDEV +++ b/etc/etc.sparc/MAKEDEV @@ -1,6 +1,6 @@ #!/bin/sh - # -# $NetBSD: MAKEDEV,v 1.26 1997/07/22 23:13:32 phil Exp $ +# $NetBSD: MAKEDEV,v 1.27 1997/07/23 01:29:56 phil Exp $ # # Copyright (c) 1990 The Regents of the University of California. # All rights reserved. @@ -310,32 +310,48 @@ ipl) pty*) class=${i#pty} case $class in - 0) offset=0 name=p;; - 1) offset=16 name=q;; - 2) offset=32 name=r;; - 3) offset=48 name=s;; -# Note that telnetd, rlogind, and xterm (at least) only look at p-s. - 4) offset=64 name=t;; - *) echo bad unit for pty in: $i;; - esac - case $class in - 0|1|2|3|4) - umask 0 - eval `echo $offset $name | awk ' { b=$1; n=$2 } END { - for (i = 0; i < 16; i++) { \ - printf("rm -f tty%s%x pty%s%x; ", \ - n, i, n, i); \ - printf("mknod tty%s%x c 20 %d; \ - mknod pty%s%x c 21 %d; ", \ - n, i, b+i, n, i, b+i); \ - } \ - }'` - umask 77 - if [ $class = 1 ]; then - mv ttyqf ttyv0; mv ptyqf ptyv0 - fi - ;; + 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 another use." + 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 + 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)) + mknod tty$name$j c 20 $unit + mknod pty$name$j c 21 $unit + done + chgrp wheel tty$name? pty$name? + chmod 666 tty$name? pty$name? + if [ $class = 1 ]; then + mv ttyqf ttyv0; mv ptyqf ptyv0 + fi ;; local) diff --git a/etc/etc.sun3/MAKEDEV b/etc/etc.sun3/MAKEDEV index ceb710097625..234df1755752 100644 --- a/etc/etc.sun3/MAKEDEV +++ b/etc/etc.sun3/MAKEDEV @@ -1,6 +1,6 @@ #!/bin/sh - # -# $NetBSD: MAKEDEV,v 1.12 1997/07/22 23:13:34 phil Exp $ +# $NetBSD: MAKEDEV,v 1.13 1997/07/23 01:29:59 phil Exp $ # # Copyright (c) 1990 The Regents of the University of California. # All rights reserved. @@ -137,27 +137,45 @@ tun*) ;; pty*) + class=${arg#pty} case $unit in - 0) offset=0 name=p;; - 1) offset=16 name=q;; - 2) offset=32 name=r;; - 3) offset=48 name=s;; -# Note that telnetd, rlogind, and xterm (at least) only look at p-s. - 4) offset=64 name=t;; - *) echo bad unit for pty in: $arg;; + 0) name=p;; + 1) name=q;; + 2) name=r;; + 3) name=s;; + 4) name=t;; + 5) name=u;; + 6) name=v;; + 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 - for pair in 0.0 1.1 2.2 3.3 4.4 5.5 6.6 7.7 \ - 8.8 9.9 a.10 b.11 c.12 d.13 e.14 f.15 + 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 do - ( - tmp="$IFS" ; IFS="$IFS." - set -- $pair - IFS="$tmp" ; unset tmp - minor=`expr $offset + $2` - mk tty$name$1 c 20 $minor - mk pty$name$1 c 21 $minor - ) + 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)) + mknod tty$name$j c 20 $unit + mknod pty$name$j c 21 $unit done + chgrp wheel tty$name? pty$name? + chmod 666 tty$name? pty$name? ;; cd*|sd*|xd*|xy*|vnd*|ccd*) diff --git a/etc/etc.vax/MAKEDEV b/etc/etc.vax/MAKEDEV index b581ab4bf510..120b56e6702b 100644 --- a/etc/etc.vax/MAKEDEV +++ b/etc/etc.vax/MAKEDEV @@ -1,5 +1,5 @@ #!/bin/sh - -# $NetBSD: MAKEDEV,v 1.9 1997/07/22 23:13:36 phil Exp $ +# $NetBSD: MAKEDEV,v 1.10 1997/07/23 01:30:01 phil Exp $ # # @(#)MAKEDEV 8.1 (Berkeley) 6/9/93 # @@ -374,25 +374,45 @@ lp*|va*|vp*) pty*) class=${i#pty}; case $class in - 0) offset=0 name=p;; - 1) offset=16 name=q;; - 2) offset=32 name=r;; - 3) offset=48 name=s;; - 4) offset=64 name=t;; - 5) offset=80 name=u;; - *) echo bad unit for pty in: $i;; - esac - case $class in - 0|1|2|3|4|5) - umask 0 - eval `echo $offset $name | awk ' { b=$1; n=$2 } END { - for (i = 0; i < 16; i++) - printf("mknod tty%s%x c 20 %d; \ - mknod pty%s%x c 21 %d; ", \ - n, i, b+i, n, i, b+i); }'` - umask 77 - ;; + 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 another use." + 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 + 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)) + mknod tty$name$j c 20 $unit + mknod pty$name$j c 21 $unit + done + chgrp wheel tty$name? pty$name? + chmod 666 tty$name? pty$name? ;; np*) diff --git a/etc/etc.x68k/MAKEDEV b/etc/etc.x68k/MAKEDEV index 88df41bb6ae0..5bfa828dd053 100755 --- a/etc/etc.x68k/MAKEDEV +++ b/etc/etc.x68k/MAKEDEV @@ -1,6 +1,6 @@ #!/bin/sh - # -# $NetBSD: MAKEDEV,v 1.10 1997/07/22 23:13:38 phil Exp $ +# $NetBSD: MAKEDEV,v 1.11 1997/07/23 01:30:04 phil Exp $ # # Copyright (c) 1990 The Regents of the University of California. # All rights reserved. @@ -370,54 +370,46 @@ kbd) ;; -# pty*) -# class=${i#pty} -# case $class in -# 0) offset=0 name=p;; -# 1) offset=16 name=q;; -# 2) offset=32 name=r;; -# 3) offset=48 name=s;; -# # Note that telnetd, rlogind, and xterm (at least) only look at p-s. -# 4) offset=64 name=t;; -# *) echo bad unit for pty in: $i;; -# esac -# case $class in -# 0|1|2|3|4) -# umask 0 -# eval `echo $offset $name | awk ' { b=$1; n=$2 } END { -# for (i = 0; i < 16; i++) -# printf("rm -f tty%s%x; mknod tty%s%x c 4 %d; \ -# rm -f pty%s%x; mknod pty%s%x c 5 %d; ", \ -# n, i, n, i, b+i, n, i, n, i, b+i); }'` -# umask 77 -# ;; -# esac -# ;; - pty*) class=${i#pty} case $class in - 0) offset=0 name=p;; - 1) offset=16 name=q;; - 2) offset=32 name=r;; - 3) offset=48 name=s;; -# Note that telnetd, rlogind, and xterm (at least) only look at p-s. - 4) offset=64 name=t;; - *) echo bad unit for pty in: $i;; - esac - case $class in - 0|1|2|3|4) - umask 0 - (i=0; while [ $i -lt 16 ]; do - eval `printf "rm -f tty%s%x; mknod tty%s%x c 4 %d; \ - rm -f pty%s%x; mknod pty%s%x c 5 %d" $name $i \ - $name $i $offset $name $i $name $i $offset` - offset=$(($offset+1)) - i=$(($i+1)) - done) - umask 77 - ;; + 0) name=p;; + 1) name=q;; + 2) name=r;; + 3) name=s;; + 4) name=t;; + 5) name=u;; + 6) name=v;; + 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 + 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)) + mknod tty$name$j c 4 $unit + mknod pty$name$j c 5 $unit + done + chgrp wheel tty$name? pty$name? + chmod 666 tty$name? pty$name? ;; bpf*|tun*|par*)