Browse Source

shave 40% off 'MAKEDEV all' by combining(eliminating) 'chgrp' fork's

OPENBSD_3_0
todd 23 years ago
parent
commit
5ac5d56571
1 changed files with 15 additions and 8 deletions
  1. +15
    -8
      src/etc/etc.sparc64/MAKEDEV

+ 15
- 8
src/etc/etc.sparc64/MAKEDEV View File

@ -1,7 +1,7 @@
#!/bin/sh -
#
# $OpenBSD: MAKEDEV,v 1.5 2001/09/04 19:17:06 todd Exp $
# $OpenBSD: MAKEDEV,v 1.6 2001/09/04 20:16:46 todd Exp $
#
# Copyright (c) 2001 Todd T. Fries <todd@OpenBSD.org>
# All rights reserved.
@ -81,8 +81,6 @@
#
PATH=/sbin:/usr/sbin:/bin:/usr/bin
T=$0
# default shell support functions
hex()
{
case $1 in
@ -165,11 +163,19 @@ M() {
[ "$G" ] && {
[ "$7" ] && {
MKlist="$MKlist;chown $7.$G $1"
} || MKlist="$MKlist;chgrp $G $1"
} || cgp $G $1
}
return 0
}
cgp() {
G=$1
[ "${grplist[$G]}" ] && {
grplist[$G]="${grplist[$G]} $2"
} || {
groups="$groups $G"
grplist[$G]="chgrp $G $2"
}
}
R() {
for i in "$@"
do
@ -354,9 +360,7 @@ st*)
ses*)
M ses$U c 4 $U 640 operator;;
ch*) M ch$U c 19 $U 660 operator;;
lkm)
M lkm c 112 0 640 kmem
;;
lkm)M lkm c 112 0 640 kmem;;
xfs*) M xfs$U c 51 $U 600;;
*random)
n=0
@ -397,4 +401,7 @@ $eo eval $RMlist
for mode in $modes; do
$eo eval ${mklist[$mode]}
done
for group in $groups; do
$eo eval ${grplist[$groupl]}
done
$eo eval $MKlist

Loading…
Cancel
Save