home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 204.img / SC386BN1.TD0 / etc / firsttime < prev    next >
Encoding:
Text File  |  1989-01-12  |  3.6 KB  |  161 lines

  1. :
  2. #    @(#) first96.src 1.20 88/07/05 
  3. #
  4. #    Copyright (C) The Santa Cruz Operation, 1986.
  5. #    This Module contains Proprietary Information of
  6. #    The Santa Cruz Operation, Microsoft Corporation
  7. #    and AT&T, and should be treated as Confidential.
  8. #
  9. #    FIRSTTIME
  10. #    12/03/85    - Version 2.2    
  11. #    1/20/86        - Version 2.3    
  12. #    1/26/86        - Version 2.4    
  13. #
  14. PATH=/bin:/etc
  15. HZ=50
  16. export PATH HZ
  17. lbl=./tmp/_lbl
  18. label="$lbl/prd=xos/typ=386AT/rel=2.3.2d/vol="
  19.  
  20. # Return code definitions
  21. : ${OK=0} ${FAIL=1} ${STOP=10} ${HALT=11}
  22.  
  23. trap 'echo "Installation aborted" >&2; exit $FAIL' 1 2 3 15
  24. cd /
  25. umask 0
  26.  
  27. echo "
  28. Xenix System V Hard Disk Installation
  29.  
  30. Checking root file system."
  31. if [ -b /dev/scratch ]; then 
  32.     fsck -t /dev/scratch /dev/root
  33. else
  34.     fsck /dev/root
  35. fi
  36.  
  37. set="Operating System (Installation)"
  38.  
  39. [ -f /etc/init.inst ] && mv /etc/init.inst /tmp
  40.  
  41. cd /tmp
  42. for script in init.*
  43. do    [ -x $script ] || continue
  44.     status=$OK
  45.     /tmp/$script
  46.     status=$?
  47.     mv /tmp/$script /tmp/_$script
  48.     case $status in
  49.     $OK)    : All is well            ;;
  50.     $STOP)    break         ;;
  51.     $HALT)    /etc/haltsys    ;;
  52.     $FAIL)    echo "Error: $script failed" >&2;;
  53.     esac
  54. done
  55. cd /
  56.  
  57. # install the real root .profile off of the B floppies
  58. mv /.profile /tmp/prof
  59. trap 'echo "Installation aborted">&2;mv /tmp/prof /.profile;exit $FAIL' 1 2 3 15
  60.  
  61. key=B
  62. set="Operating System (Basic Utilities)"
  63. label="$lbl/prd=xos/typ=n*86/rel=*/vol="
  64. for i in 1 2 3 4 5 6 7
  65. do
  66.     while echo "\nInsert $set volume $key$i\007\nand press <RETURN> \c"
  67.     do
  68.         read x
  69.         case `tar tqnfb /dev/rinstall 10 $lbl 2>/dev/null` in
  70.         $label${key}0$i)
  71.             until    tar xfb /dev/rinstall 10
  72.             do    echo "Extraction error: try again? (y/n) \c" >&2
  73.                 read yn
  74.                 [ "$yn" = n ] && break
  75.             done
  76.             cd /tmp
  77.             for script in init.*
  78.             do    [ -x $script ] || continue
  79.                 status=$OK
  80.                 /tmp/$script
  81.                 status=$?
  82.                 mv /tmp/$script /tmp/_$script
  83.                 case $status in
  84.                 $OK)    : All is well            ;;
  85.                 $STOP)    break 3    ;;
  86.                 $HALT)    /etc/haltsys ;;
  87.                 $FAIL)    echo "Error: $script failed" >&2;;
  88.                 esac
  89.             done
  90.             cd /
  91.             break ;;
  92.             *)
  93.             echo "\nError: incorrect volume in drive!"
  94.             esac
  95.     done
  96. done
  97. cd /
  98. echo "\nSetting up system directories.\n"
  99. if [ -d /lost+found ]; then
  100.     # make 62 entries (1k block)
  101.     for i in 1 2 3 4 5 6 7 8
  102.     do    for j in 1 2 3 4 5 6 7
  103.              do    > /lost+found/x$i$j
  104.              done
  105.     done
  106.     for i in 1 2 3 4 5 6
  107.     do  > /lost+found/xz$i
  108.     done
  109.         rm -f /lost+found/x??
  110. else
  111.     echo "
  112. It appears that the Xenix Operating System Set was not
  113. successfully installed. Check the release notes to confirm 
  114. that you have the proper number of floppies and re-install.\n"
  115.     exit $FAIL
  116. fi
  117.  
  118. # Set up mnttab for df command
  119. echo 'root /' | /etc/setmnt
  120.  
  121. echo "
  122. You have now installed the Xenix minimum run time system.
  123. The run time system will support most application programs,
  124. so you may choose to stop the installation now and preserve
  125. the maximum available disk space for user files.
  126.  
  127. The remainder of the Xenix Operating System, Development
  128. System and Text Processing sets are installable in small
  129. packages.   You may either install each set entirely or
  130. selectively choose which packages of the set to install.
  131.  
  132.         Current Disk Usage
  133. ------------------------------------------------------
  134. `df -v`
  135. ------------------------------------------------------"
  136.  
  137. while    echo "
  138.     1. Stop installation now
  139.     2. Continue installation
  140.  
  141. Enter an option: \c" >&2
  142. do    read x
  143.     case $x in
  144.     1)    break                    ;;
  145.     2)    trap '' 2; custom; trap 2; break    ;;
  146.     *)    echo "Enter either '1' or '2'" >&2    ;;
  147.     esac
  148. done
  149.  
  150. echo "
  151. Hard disk installation complete.
  152.  
  153. AFTER you see the message: '** Normal System Shutdown **'
  154. reboot the system by opening the floppy door and pressing any key.
  155. The screen will clear and you will see the boot message:
  156.  
  157.     Boot
  158.     :
  159.  
  160. Press <RETURN> to boot off the hard disk\n"
  161.