From 10e3578e9a3a45385d07b381a049e06d8087d37d Mon Sep 17 00:00:00 2001 From: deraadt Date: Thu, 16 Nov 1995 02:54:44 +0000 Subject: [PATCH] use awk instead of newish sh features --- etc/etc.mvme68k/MAKEDEV | 14 ++++++-------- 1 file 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 -- 2.20.1