home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume1 / 8707 / 74 / mkpty next >
Encoding:
Text File  |  1990-07-13  |  401 b   |  17 lines

  1. #!/bin/sh
  2. smajor=`grep pts master|cut -f8`
  3. mmajor=`grep ptm master|cut -f8`
  4. ndevs=`grep pts_cnt conf.c|sed 's/int    pts_cnt = \([0-9]*\);/\1/'`
  5. minor=0
  6. for x in p q r s t u v w x y z
  7. do
  8.     for y in 0 1 2 3 4 5 6 7 8 9 a b c d e f
  9.     do
  10.         i=$x$y
  11.         if [ $minor -ge $ndevs ]; then break; fi
  12.         /etc/mknod /dev/pty$i c $mmajor $minor
  13.         /etc/mknod /dev/tty$i c $smajor $minor
  14.         minor=`expr $minor + 1`
  15.     done
  16. done
  17.