diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-11-16 02:54:45 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-11-16 02:54:45 +0000 |
commit | ecdda4e71f3b2f7cae5f01f6e81c39d899187c57 (patch) | |
tree | 109ed2668d31c5fd612d17ddc35ce09eb03588e7 /etc/etc.mvme68k | |
parent | 141bbdc7c69471df2ef9c8bf7a4a74e3c38955ed (diff) |
use awk instead of newish sh features
Diffstat (limited to 'etc/etc.mvme68k')
-rw-r--r-- | etc/etc.mvme68k/MAKEDEV | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/etc/etc.mvme68k/MAKEDEV b/etc/etc.mvme68k/MAKEDEV index 4fc389bc0d5..6c79d0208cd 100644 --- a/etc/etc.mvme68k/MAKEDEV +++ b/etc/etc.mvme68k/MAKEDEV @@ -31,7 +31,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $Id: MAKEDEV,v 1.3 1995/11/07 22:50:58 deraadt Exp $ +# $Id: MAKEDEV,v 1.4 1995/11/16 02:54:44 deraadt Exp $ # # Device "make" file. Valid arguments: # all makes all known devices, including local devices, @@ -286,13 +286,11 @@ pty*) 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) + 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 ;; esac |