home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 206.img / SCO386N3.TD0 / tmp / init.link
Encoding:
Text File  |  1988-08-22  |  964 b   |  43 lines

  1. #
  2. #    @(#) link.src 1.8 88/08/12 
  3. #  /tmp/init.link - onetime initialization script
  4. #
  5. PATH=/bin:/usr/bin:/etc
  6.  
  7. # Return code definitions
  8. : ${OK=0} ${FAIL=1} ${STOP=10} ${HALT=11}
  9.  
  10. # Must be at root for fixperm to work
  11. cd /
  12.  
  13. # Brand the link kit
  14. echo "\nLink kit serialization" >&2
  15. file=/usr/sys/mdep/libmdep.a
  16. while    echo "\nEnter your serial number: \c"
  17. do    read serial
  18.     echo "\nEnter your activation key: \c"
  19.     read key
  20.     /etc/brand $serial $key $file
  21.     case $? in
  22.     0)    break                        ;;
  23.     1)    echo "Error, please try again" >&2        ;;
  24.     2)    ;;
  25.     3)    echo "$file is already serialized" >&2; break    ;;
  26.     esac
  27.     while    echo "Do you wish to try activation again? (y/n) \c"
  28.         read yn
  29.     do    case $yn in
  30.         [Yy]*)    break
  31.             ;;
  32.         [Nn]*)    echo "
  33. The Xenix link kit will not work correctly without proper
  34. serialization.  Contact your support center to obtain a
  35. valid activation key and re-install the link kit." >&2
  36.         exit $FAIL
  37.         ;;
  38.         *)    echo "Enter either 'y' or 'n'" >&2
  39.         esac
  40.     done
  41. done
  42. exit $OK
  43.