summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-11-06 01:34:03 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-11-06 01:34:03 +0000
commit308913dbf6b484706a0f2e2a75f669a280b1b44c (patch)
treee658090c16b5d95e0a7e87e0f629123408491daf /etc
parent8da7fc5e083e2aa75b8e75993b460830d719adea (diff)
give floppies real partitions
Diffstat (limited to 'etc')
-rw-r--r--etc/etc.i386/MAKEDEV64
-rw-r--r--etc/etc.sparc/MAKEDEV64
2 files changed, 123 insertions, 5 deletions
diff --git a/etc/etc.i386/MAKEDEV b/etc/etc.i386/MAKEDEV
index 040020d5295..ac883916b95 100644
--- a/etc/etc.i386/MAKEDEV
+++ b/etc/etc.i386/MAKEDEV
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $OpenBSD: MAKEDEV,v 1.29 1996/10/15 07:44:22 downsj Exp $
+# $OpenBSD: MAKEDEV,v 1.30 1996/11/06 01:34:01 deraadt Exp $
# $NetBSD: MAKEDEV,v 1.40 1996/03/31 00:50:47 perry Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
@@ -163,7 +163,67 @@ rd*)
umask 77
;;
-ccd*|fd*|sd*|vnd*|wd*)
+fd*)
+ umask 2 ; unit=`expr $i : 'fd.*\(.\)$'`
+ typnam=`expr $i : 'fd\(.\).*'`
+ case $typnam in
+ 0|1|2|3) typnam=; typnum=0;; # no type specified, assume A
+ A) typnam=; typnum=0;;
+ B) typnum=1;;
+ C) typnum=2;;
+ D) typnum=3;;
+ E) typnum=4;;
+ F) typnum=5;;
+ G) typnum=6;;
+ H) typnum=7;;
+ *) echo bad type $typnam for $i; exit 1;;
+ esac
+ case $unit in
+ 0|1) blk=20; chr=48;;
+ 2|3) blk=21; chr=49;;
+ *) echo bad unit $unit for $i; exit 1;;
+ esac
+ nam=fd${typnam}${unit}
+ rm -f ${nam}? r${nam}?
+ basenum=`expr $unit '*' 128 + $typnum '*' 16`
+ mknod ${nam}a b $blk `expr $basenum + 0`
+ mknod ${nam}b b $blk `expr $basenum + 1`
+ mknod ${nam}c b $blk `expr $basenum + 2`
+ #mknod ${nam}d b $blk `expr $basenum + 3`
+ #mknod ${nam}e b $blk `expr $basenum + 4`
+ #mknod ${nam}f b $blk `expr $basenum + 5`
+ #mknod ${nam}g b $blk `expr $basenum + 6`
+ #mknod ${nam}h b $blk `expr $basenum + 7`
+ #mknod ${nam}i b $blk `expr $basenum + 8`
+ #mknod ${nam}j b $blk `expr $basenum + 9`
+ #mknod ${nam}k b $blk `expr $basenum + 10`
+ #mknod ${nam}l b $blk `expr $basenum + 11`
+ #mknod ${nam}m b $blk `expr $basenum + 12`
+ #mknod ${nam}n b $blk `expr $basenum + 13`
+ #mknod ${nam}o b $blk `expr $basenum + 14`
+ #mknod ${nam}p b $blk `expr $basenum + 15`
+ mknod r${nam}a c $chr `expr $basenum + 0`
+ mknod r${nam}b c $chr `expr $basenum + 1`
+ mknod r${nam}c c $chr `expr $basenum + 2`
+ #mknod r${nam}d c $chr `expr $basenum + 3`
+ #mknod r${nam}e c $chr `expr $basenum + 4`
+ #mknod r${nam}f c $chr `expr $basenum + 5`
+ #mknod r${nam}g c $chr `expr $basenum + 6`
+ #mknod r${nam}h c $chr `expr $basenum + 7`
+ #mknod r${nam}i c $chr `expr $basenum + 8`
+ #mknod r${nam}j c $chr `expr $basenum + 9`
+ #mknod r${nam}k c $chr `expr $basenum + 10`
+ #mknod r${nam}l c $chr `expr $basenum + 11`
+ #mknod r${nam}m c $chr `expr $basenum + 12`
+ #mknod r${nam}n c $chr `expr $basenum + 13`
+ #mknod r${nam}o c $chr `expr $basenum + 14`
+ #mknod r${nam}p c $chr `expr $basenum + 15`
+ chown root.operator ${nam}[a-p] r${nam}[a-p]
+ chmod 640 ${nam}[a-p] r${nam}[a-p]
+ umask 77
+ ;;
+
+ccd*|sd*|vnd*|wd*)
umask 2 ; unit=`expr $i : '.*d\(.*\)'`
case $i in
ccd*) name=ccd; blk=16; chr=18;;
diff --git a/etc/etc.sparc/MAKEDEV b/etc/etc.sparc/MAKEDEV
index 6f35f1dae5b..e3e9e5e86ed 100644
--- a/etc/etc.sparc/MAKEDEV
+++ b/etc/etc.sparc/MAKEDEV
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $OpenBSD: MAKEDEV,v 1.9 1996/09/18 22:03:47 deraadt Exp $
+# $OpenBSD: MAKEDEV,v 1.10 1996/11/06 01:34:02 deraadt Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@@ -163,11 +163,69 @@ tun*)
chown root.wheel tun$unit
;;
-ccd*|fd*|sd*|xd*|xy*|cd*|vnd*)
+fd*)
+ umask 2 ; unit=`expr $i : 'fd.*\(.\)$'`
+ typnam=`expr $i : 'fd\(.\).*'`
+ case $typnam in
+ 0|1) typnam=; typnum=0;; # no type specified, assume A
+ A) typnam=; typnum=0;;
+ B) typnum=1;;
+ C) typnum=2;;
+ D) typnum=3;;
+ E) typnum=4;;
+ F) typnum=5;;
+ G) typnum=6;;
+ H) typnum=7;;
+ *) echo bad type $typnam for $i; exit 1;;
+ esac
+ case $unit in
+ 0|1) blk=16; chr=54;;
+ *) echo bad unit $unit for $i; exit 1;;
+ esac
+ nam=fd${typnam}${unit}
+ rm -f ${nam}? r${nam}?
+ basenum=`expr $unit '*' 128 + $typnum '*' 16`
+ mknod ${nam}a b $blk `expr $basenum + 0`
+ mknod ${nam}b b $blk `expr $basenum + 1`
+ mknod ${nam}c b $blk `expr $basenum + 2`
+ #mknod ${nam}d b $blk `expr $basenum + 3`
+ #mknod ${nam}e b $blk `expr $basenum + 4`
+ #mknod ${nam}f b $blk `expr $basenum + 5`
+ #mknod ${nam}g b $blk `expr $basenum + 6`
+ #mknod ${nam}h b $blk `expr $basenum + 7`
+ #mknod ${nam}i b $blk `expr $basenum + 8`
+ #mknod ${nam}j b $blk `expr $basenum + 9`
+ #mknod ${nam}k b $blk `expr $basenum + 10`
+ #mknod ${nam}l b $blk `expr $basenum + 11`
+ #mknod ${nam}m b $blk `expr $basenum + 12`
+ #mknod ${nam}n b $blk `expr $basenum + 13`
+ #mknod ${nam}o b $blk `expr $basenum + 14`
+ #mknod ${nam}p b $blk `expr $basenum + 15`
+ mknod r${nam}a c $chr `expr $basenum + 0`
+ mknod r${nam}b c $chr `expr $basenum + 1`
+ mknod r${nam}c c $chr `expr $basenum + 2`
+ #mknod r${nam}d c $chr `expr $basenum + 3`
+ #mknod r${nam}e c $chr `expr $basenum + 4`
+ #mknod r${nam}f c $chr `expr $basenum + 5`
+ #mknod r${nam}g c $chr `expr $basenum + 6`
+ #mknod r${nam}h c $chr `expr $basenum + 7`
+ #mknod r${nam}i c $chr `expr $basenum + 8`
+ #mknod r${nam}j c $chr `expr $basenum + 9`
+ #mknod r${nam}k c $chr `expr $basenum + 10`
+ #mknod r${nam}l c $chr `expr $basenum + 11`
+ #mknod r${nam}m c $chr `expr $basenum + 12`
+ #mknod r${nam}n c $chr `expr $basenum + 13`
+ #mknod r${nam}o c $chr `expr $basenum + 14`
+ #mknod r${nam}p c $chr `expr $basenum + 15`
+ chown root.operator ${nam}[a-p] r${nam}[a-p]
+ chmod 640 ${nam}[a-p] r${nam}[a-p]
+ umask 77
+ ;;
+
+ccd*|sd*|xd*|xy*|cd*|vnd*)
umask 2
case $i in
ccd*) name=ccd; blk=9; chr=23;;
- fd*) name=fd; blk=16; chr=54;;
sd*) name=sd; blk=7; chr=17;;
xd*) name=xd; blk=10; chr=42;;
xy*) name=xy; blk=3; chr=9;;