home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume26 / dup / part01 / Install < prev    next >
Encoding:
Text File  |  1993-01-29  |  931 b   |  48 lines

  1. MODULE=dup
  2. make ${MODULE}.o || exit    # Don't bother with anything if we can't make.
  3.  
  4. NOFILE=20    # Do we really need more?
  5.  
  6. set -e
  7.  
  8. cd /usr/sys/conf
  9.  
  10. [ -d /dev/fd ] && [ -c /dev/stdin ] ||
  11. {
  12.     echo 'Making files in /dev'
  13.     major=`./configure -j NEXTMAJOR`
  14.  
  15.     echo 'The major device number for the /dev/fd driver is' $major
  16.  
  17.     echo 'Adding "../io/dup/dup.o" to link_xenix'
  18.     ed - ./link_xenix <<\SCRIPT
  19. /uts.o/a
  20.     ../io/dup/dup.o \
  21. .
  22. w
  23. q
  24. SCRIPT
  25.  
  26.     echo 'Updating master and xenixconf files'
  27.     ./configure -c -m $major -a dupopen
  28.  
  29.     rm -rf /dev/fd /dev/stdin /dev/stdout /dev/stderr
  30.     mkdir /dev/fd
  31.     chmod 755 /dev/fd
  32.     minor=0
  33.     while [ $minor -lt $NOFILE ]
  34.     do
  35.         mknod /dev/fd/$minor c $major $minor
  36.         chmod 666 /dev/fd/$minor
  37.         minor=`expr $minor + 1`
  38.     done
  39.     ln -f /dev/fd/0 /dev/stdin
  40.     ln -f /dev/fd/1 /dev/stdout
  41.     ln -f /dev/fd/2 /dev/stderr
  42. }
  43.  
  44. echo 'Building new xenix'
  45. ./link_xenix
  46.  
  47. echo 'You must now install the new xenix in / and reboot'
  48.