home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a523 / 1.ddi / SYSINIT.ORI < prev   
Encoding:
Text File  |  1990-12-13  |  11.8 KB  |  564 lines

  1. #-------------------------------------------------------------------------
  2. #
  3. # FILE
  4. #       SYSINIT.ORI
  5. #       V6.0 installation environment initialization file.
  6. #
  7. # DESCRIPTION
  8. #       This file initializes the environment for the installation process.
  9. #       It is always read first by ORAINST.
  10. #
  11. # OWNER
  12. #       Tim Kelley
  13. #
  14. # CREATION DATE
  15. #       19-JUL-89
  16. #
  17. # CURRENT VERSION
  18. #       13-SEP-90
  19. #
  20. #-------------------------------------------------------------------------
  21.  
  22. # if we're coming back from ORAINST1, don't do anything
  23.  
  24. .IF (%CHAIN%==1)
  25.  .EXIT
  26. .ENDIF
  27.  
  28. # first check the environment
  29.  
  30. .RDBMS_VERSION=6
  31. .ENVIRON=0
  32. .RESULT=0
  33. .FLOPPY=YES
  34.  
  35. .TRANSLATE
  36.  %CONFIG%
  37.  CONFIG
  38.  
  39. .TRANSLATE
  40.  %ORACLE_HOME%
  41.  ORACLE_HOME
  42.  
  43. .ACCESS
  44.  %ORACLE_HOME%\PBIN
  45.  
  46. .RESULT=%RESULT%+%ACCESSRET%
  47.  
  48. .ACCESS
  49.  %ORACLE_HOME%\BIN
  50.  
  51. .RESULT=%RESULT%+%ACCESSRET%
  52.  
  53. .ACCESS
  54.  %ORACLE_HOME%\DBS
  55.  
  56. .RESULT=%RESULT%+%ACCESSRET%
  57.  
  58. .ACCESS
  59.  %CONFIG%
  60.  
  61. .RESULT=%RESULT%+%ACCESSRET%
  62.  
  63. # is everything there?
  64.  
  65. .IF (%CONFIG%!="" && %ORACLE_HOME%!="\ORACLE5" && %RESULT%==4)
  66.  .ENVIRON=1
  67. .ENDIF
  68.  
  69. # if we're not executing ORAINST from a floppy drive, set a default
  70. # %SOURCE_DISK%
  71.  
  72. .IF (%SOURCE_DISK%=="ZZ")
  73.  .FLOPPY=NO
  74.  .SOURCE_DISK=A
  75. .ENDIF
  76.  
  77. # if the environment is bad and we're not executing from a floppy drive,
  78. # it's time to quit
  79.  
  80. .IF (%ENVIRON%==0 && %FLOPPY%=="NO")
  81.  .MESSAGE
  82.   %HILITE%
  83.  
  84.   The ORACLE installation files need to be updated.  To do this, you
  85.   must run ORAINST from your Installation diskette.  Please re-execute
  86.   ORAINST from your floppy drive now by typing "A:ORAINST",
  87.   substituting the appropriate drive letter for A.
  88.  
  89.  .EXIT
  90. .ENDIF
  91.  
  92. # if we couldn't find %ORACLE_HOME%, build a default
  93.  
  94. .IF (%ORACLE_HOME%=="\ORACLE5")
  95.  .ORACLE_HOME=%ORACLE_DISK%:\ORACLE%RDBMS_VERSION%
  96. .ENDIF
  97.  
  98. .<LOGO>
  99.  
  100. .CLEARSCREEN
  101.  
  102. .MESSAGE
  103. %NORMAL%
  104. %WARNING%     ▄▀▀▀▀▀▀▀▀▀▄   ▄▀▀▀▀▀▀▄     ▄▀▄      ▄▀▀▀▀▀▀▀ █        ▄▀▀▀▀▀▀▀▀
  105. %WARNING%    █           █  █      █    █   █    █         █       █
  106. %WARNING%   █             █ █ ▀█▀▀▀    █▄▄▄▄ █  █          █       █▄▄▄▄▄▄▄▄▄
  107. %WARNING%    █           █  █   ▀▄    █       █  █         █       █
  108. %WARNING%     ▀▄▄▄▄▄▄▄▄▄▀   █     ▀▄ █         █  ▀▄▄▄▄▄▄▄ █▄▄▄▄▄▄▄ ▀▄▄▄▄▄▄▄▄
  109.  
  110. %NORMAL%           (c) Copyright Oracle Corporation, 1987, 1990.
  111.  
  112. %NORMAL%                   Installation Version %INSTALL_VERSION%
  113. %NORMAL%                        All Rights Reserved
  114.  
  115.  
  116. This program installs ORACLE software on your system by creating
  117. the appropriate directories on your hard disk and then copying the
  118. product files.  In addition, this install may ask for information
  119. in order to configure your system properly for ORACLE.
  120.  
  121. Follow the instructions on the screen and also refer to the
  122. appropriate ORACLE "Getting Started" booklet.
  123.  
  124.  
  125.  
  126. .PAUSE
  127.  
  128. #-------------------------------------------------------------------------
  129. # Prompt user for SOURCE DISK (A: or B:), the disk where ORACLE products
  130. # will be installed from.
  131. #-------------------------------------------------------------------------
  132. .<SRCDISK>
  133. .CLEARSCREEN
  134. .MESSAGE
  135.  %HILITE% Please answer the following questions regarding this installation
  136.  session.  For each question, you may accept the default or supply a
  137.  new answer.
  138.  
  139. .<INVAL_DRIVE>
  140. .STRINGPROMPT 1 1
  141.  USER_RESP
  142.  Enter the drive you will install ORACLE products from.
  143.  <SRCDHELP>
  144.  %SOURCE_DISK%
  145.  
  146. .IF (%USER_RESP%=="999")
  147.  .GOTO <LOGO>
  148. .ENDIF
  149.  
  150. .ACCESS -DRIVE
  151.  %USER_RESP%:
  152.  
  153. .IF (%ACCESSRET%==0)
  154.  .MESSAGE
  155.   %WARNING%
  156.   Invalid drive - please reenter.
  157.  
  158.  .GOTO <INVAL_DRIVE>
  159. .ENDIF
  160.  
  161. .SOURCE_DISK=%USER_RESP%
  162.  
  163. .<OHOME>
  164. .STRINGPROMPT
  165.  USER_RESP
  166.  Enter the disk drive and path you will install ORACLE products to.
  167.  <HOMEHELP>
  168.  %ORACLE_HOME%
  169.  
  170. .IF (%USER_RESP%=="999")
  171.  .CLEARSCREEN
  172.  .GOTO <SRCDISK>
  173. .ELSE
  174.  .IF (%ORACLE_HOME%!=%USER_RESP%)
  175.   .ORACLE_HOME=%USER_RESP%
  176.   .ENVIRON=0
  177.  .ENDIF
  178. .ENDIF
  179.  
  180. .MKDIR
  181.  %ORACLE_HOME%
  182.  
  183. .IF (%MKDIRRET%!=0)
  184.  .MESSAGE
  185.   %WARNING%
  186.   Invalid pathname - please reenter.
  187.  
  188.  .GOTO <OHOME>
  189. .ENDIF
  190.  
  191. .ACCESS
  192.  %ORACLE_HOME%\DBS\REGISTER.ORA
  193.  
  194. .REGISTER=%ACCESSRET%
  195.  
  196. #  if environment OK, do other checks & exit
  197. .IF (%ENVIRON%==1)
  198.  
  199.  .IF (%REGISTER%==0)
  200.   .SYSCALL -QUIET
  201.    COPY %SOURCE_DISK%:\REGISTER.ORA %ORACLE_HOME%\DBS >NUL
  202.  .ENDIF
  203.  
  204. # make sure that we have the right install version
  205.  
  206.  .CHECKREG 0
  207.   PRODUCT
  208.   VERSION
  209.  
  210.  .IF (%VERSION%<%INSTALL_VERSION% || %VERSION%>"5")
  211.   .IF (%FLOPPY%=="YES")
  212.    .RUNSCRIPT %SOURCE_DISK%:\INSTALL.ORI
  213.   .ELSE
  214.    .MESSAGE
  215.     %HILITE%
  216.  
  217.     The ORACLE installation files need to be updated.  To do this, you
  218.     must run ORAINST from your Installation diskette.  Please re-execute
  219.     ORAINST from your floppy drive now by typing "A:ORAINST",
  220.     substituting the appropriate drive letter for A.
  221.  
  222.    .ENVIRON=0
  223.   .ENDIF
  224.  .ENDIF
  225.  
  226.  .EXIT
  227. .ENDIF
  228.  
  229. # Otherwise, bad environment so fix it!
  230. # Since the environment is bad, then we will need to know
  231. # the boot drive in order to modify the environment...
  232.  
  233. .BOOT_DISK=C
  234.  
  235. .<BTDISK>
  236. .STRINGPROMPT 1 1
  237.  USER_RESP
  238.  Enter the drive you boot your computer from.
  239.  <BOOTHELP>
  240.  %BOOT_DISK%
  241.  
  242. .IF (%USER_RESP%=="999")
  243.  .MESSAGE
  244.   %NORMAL%
  245.  .GOTO <OHOME>
  246. .ENDIF
  247.  
  248. .ACCESS -DRIVE
  249.  %USER_RESP%:
  250.  
  251. .IF (%ACCESSRET%==0)
  252.  .MESSAGE
  253.   %WARNING%
  254.   Invalid drive - please reenter.
  255.  
  256.  .GOTO <BTDISK>
  257. .ENDIF
  258.  
  259. .BOOT_DISK=%USER_RESP%
  260.  
  261. .CLEARSCREEN
  262.  
  263. .MESSAGE
  264.  %NORMAL%
  265.  
  266. Configuring system (please wait) ...
  267.  
  268. # Create the ORACLE home directories.
  269.  
  270. .MKDIR
  271.  %ORACLE_HOME%\PBIN
  272.  
  273. .MKDIR
  274.  %ORACLE_HOME%\BIN
  275.  
  276. .MKDIR
  277.  %ORACLE_HOME%\DBS
  278.  
  279. # if there isn't a REGISTER.ORA, get one
  280.  
  281. .IF (%REGISTER%==0)
  282.  .SYSCALL -QUIET
  283.   COPY %SOURCE_DISK%:\REGISTER.ORA %ORACLE_HOME%\DBS >NUL
  284. .ENDIF
  285.  
  286. #
  287. #  Check CONFIG.ORA to make sure %ORACLE_HOME% is correct
  288. #
  289.  
  290. .ACCESS
  291.  %ORACLE_HOME%\CONFIG.ORA
  292.  
  293. .IF (%ACCESSRET%==1)
  294.  .MESSAGE
  295.   %NORMAL% Modifying %ORACLE_HOME%\CONFIG.ORA ...
  296.  .MODFILE 0
  297.   %ORACLE_HOME%\CONFIG.ORA
  298. ORACLE_HOME=%ORACLE_HOME%
  299. .ELSE
  300.  .MESSAGE
  301.   %NORMAL% Creating file %ORACLE_HOME%\CONFIG.ORA ...
  302.  .WRITEFILE
  303.   %ORACLE_HOME%\CONFIG.ORA
  304. ORACLE_HOME=%ORACLE_HOME%
  305. .ENDIF
  306.  
  307. #
  308. #  Update the installation files
  309. #
  310.  
  311. .RUNSCRIPT %SOURCE_DISK%:\INSTALL.ORI
  312.  
  313. #
  314. #  Update DOS's CONFIG.SYS file to have all the current info.
  315. #
  316.  
  317. .CONFUPDATE=0
  318. .AUTOUPDATE=0
  319. .NEWCONF=0
  320. .NEWAUTO=0
  321.  
  322. .IF (%BOOT_DISK%<"C")
  323.  .MESSAGE
  324.   %HILITE%
  325.   Please insert your boot diskette in drive %BOOT_DISK%: now.
  326.  
  327.  .PAUSE
  328. .ENDIF
  329.  
  330. .ACCESS
  331.  %BOOT_DISK%:\CONFIG.SYS
  332.  
  333. .IF (%ACCESSRET%==1)
  334.  
  335. # CONFIG.SYS exists
  336.  
  337.  .SYSCALL -QUIET
  338.   COPY %BOOT_DISK%:\CONFIG.SYS %BOOT_DISK%:\CONFIG.NEW >NUL
  339.  
  340.  .RESULT=0
  341.  
  342.  .MODFILE 2
  343.   %BOOT_DISK%:\CONFIG.NEW
  344. FILES=40
  345.  .RESULT=%RESULT%+%MODIFIED%
  346.  
  347.  .MODFILE 2
  348.   %BOOT_DISK%:\CONFIG.NEW
  349. BUFFERS=16
  350.  .RESULT=%RESULT%+%MODIFIED%
  351.  
  352.  .MODFILE 0
  353.   %BOOT_DISK%:\CONFIG.NEW
  354. BREAK=ON
  355.  .RESULT=%RESULT%+%MODIFIED%
  356.  
  357.  .IF (%RESULT% > 0)
  358.   .CONFUPDATE=1
  359.   .<MODCONFIG>
  360.   .SELECTPROMPT
  361.    USER_RESPONSE
  362.    Changes to the file %BOOT_DISK%:\CONFIG.SYS are needed.
  363.    Would you like the changes to be made automatically?
  364.    <CONFHELP>
  365.    1       Yes
  366.    2       No
  367.  
  368.   .IF (%USER_RESPONSE%==1)
  369.    .SYSCALL
  370.     COPY %BOOT_DISK%:\CONFIG.SYS %BOOT_DISK%:\CONFIG.BAK >NUL
  371.    .SYSCALL
  372.     COPY %BOOT_DISK%:\CONFIG.NEW %BOOT_DISK%:\CONFIG.SYS >NUL
  373.    .SYSCALL
  374.     DEL %BOOT_DISK%:\CONFIG.NEW >NUL
  375.   .ELSE
  376.    .IF (%USER_RESPONSE%==2)
  377.     .NEWCONF=1
  378.    .ELSE
  379.     .SYSCALL
  380.      DEL %BOOT_DISK%:\CONFIG.NEW >NUL
  381.     .GOTO <BTDISK>
  382.    .ENDIF
  383.   .ENDIF
  384.  .ELSE
  385.  
  386. # No changes to CONFIG were necessary
  387.  
  388.   .SYSCALL
  389.    DEL %BOOT_DISK%:\CONFIG.NEW
  390.  .ENDIF
  391.  
  392. .ELSE
  393.  
  394. # CONFIG.SYS doesn't exist
  395.  
  396.  .MESSAGE
  397.   %HILITE%
  398.   Warning - could not find file %BOOT_DISK%:\CONFIG.SYS
  399.   Creating file %BOOT_DISK%:\CONFIG.SYS...
  400.  
  401.  .WRITEFILE
  402.   %BOOT_DISK%:\CONFIG.SYS
  403. FILES=40
  404. BUFFERS=16
  405. BREAK=ON
  406. .ENDIF
  407.  
  408. # Now check AUTOEXEC.BAT
  409.  
  410. .ACCESS
  411.  %BOOT_DISK%:\AUTOEXEC.BAT
  412.  
  413. .IF (%ACCESSRET%==1)
  414.  
  415. # AUTOEXEC.BAT exists
  416.  
  417.  .RESULT=0
  418.  
  419.  .SYSCALL -QUIET
  420.   COPY %BOOT_DISK%:\AUTOEXEC.BAT %BOOT_DISK%:\AUTOEXEC.NEW >NUL
  421.  
  422.  .MODFILE 0
  423.   %BOOT_DISK%:\AUTOEXEC.NEW
  424. SET CONFIG=%ORACLE_HOME%\CONFIG.ORA
  425.  .RESULT=%RESULT%+%MODIFIED%
  426.  
  427.  .MODFILE 1
  428.   %BOOT_DISK%:\AUTOEXEC.NEW
  429. SET PATH=%ORACLE_HOME%\BIN;
  430.  .RESULT=%RESULT%+%MODIFIED%
  431.  
  432.  .MODFILE 1
  433.   %BOOT_DISK%:\AUTOEXEC.NEW
  434. SET PATH=%ORACLE_HOME%\PBIN;
  435.  .RESULT=%RESULT%+%MODIFIED%
  436.  
  437.  .IF (%RESULT%>0)
  438.  
  439.   .<MODAUTO>
  440.   .SELECTPROMPT
  441.    USER_RESPONSE
  442.    Changes to the file %BOOT_DISK%:\AUTOEXEC.BAT are needed.
  443.    Would you like the changes to be made automatically?
  444.    <AUTOHELP>
  445.    1       Yes
  446.    2       No
  447.  
  448.   .IF (%USER_RESPONSE%==1)
  449.    .SYSCALL
  450.     COPY %BOOT_DISK%:\AUTOEXEC.BAT %BOOT_DISK%:\AUTOEXEC.BAK >NUL
  451.    .SYSCALL
  452.     COPY %BOOT_DISK%:\AUTOEXEC.NEW %BOOT_DISK%:\AUTOEXEC.BAT >NUL
  453.    .SYSCALL
  454.     DEL %BOOT_DISK%:\AUTOEXEC.NEW
  455.   .ELSE
  456.    .IF (%USER_RESPONSE%==2)
  457.     .NEWAUTO=1
  458.    .ELSE
  459.     .IF (%CONFUPDATE%==1)
  460.      .IF (%NEWCONF%==0)
  461.       .SYSCALL
  462.        COPY %BOOT_DISK%:\CONFIG.SYS %BOOT_DISK%:\CONFIG.NEW >NUL
  463.       .SYSCALL
  464.        COPY %BOOT_DISK%:\CONFIG.BAK %BOOT_DISK%:\CONFIG.SYS >NUL
  465.       .SYSCALL
  466.        DEL %BOOT_DISK%:\CONFIG.BAK
  467.      .ENDIF
  468.      .NEWCONF=0
  469.      .GOTO <MODCONFIG>
  470.     .ENDIF
  471.     .GOTO <BTDISK>
  472.    .ENDIF
  473.   .ENDIF
  474.  .ELSE
  475.  
  476. # No changes to AUTOEXEC were necessary
  477.  
  478.  .SYSCALL
  479.   DEL %BOOT_DISK%:\AUTOEXEC.NEW
  480.  .ENDIF
  481. .ELSE
  482.  
  483. # AUTOEXEC.BAT doesn't exist
  484.  
  485.  .MESSAGE
  486.   %HILITE%
  487.   Warning - could not find file %BOOT_DISK%:\AUTOEXEC.BAT
  488.   Creating file %BOOT_DISK%:\AUTOEXEC.BAT...
  489.  
  490.  .WRITEFILE
  491.   %BOOT_DISK%:\AUTOEXEC.BAT
  492. @ECHO OFF
  493. VER
  494. PROMPT $P$G
  495.  
  496. PATH %ORACLE_HOME%\PBIN;%ORACLE_HOME%\BIN;%BOOT_DISK%:\
  497. SET CONFIG=%ORACLE_HOME%\CONFIG.ORA
  498. .ENDIF
  499.  
  500. .CLEARSCREEN
  501. .IF (%NEWCONF%==1)
  502.  .MESSAGE
  503.   %NORMAL%      A sample CONFIG.SYS can be found in %BOOT_DISK%:\CONFIG.NEW
  504.   %NORMAL%      See your "Getting Started" manual for help with editing the
  505.   %NORMAL%      changes into your CONFIG.SYS file.
  506.  
  507. .ENDIF
  508. .IF (%NEWAUTO%==1)
  509.  .MESSAGE
  510.   %NORMAL%      A sample AUTOEXEC.BAT can be found in %BOOT_DISK%:\AUTOEXEC.NEW
  511.   %NORMAL%      See your "Getting Started" manual for help with editing the
  512.   %NORMAL%      changes into your AUTOEXEC.BAT file.
  513.  
  514. .ENDIF
  515.  
  516. .IF (%BOOT_DISK%<"C")
  517.  .MESSAGE
  518.   %HILITE%
  519.   In order to initialize the environment properly, please reboot
  520.   your PC by pressing <CTRL-ALT-DEL>.  After rebooting, continue
  521.   the installation by typing ORAINST at the DOS prompt.
  522.  
  523. .ELSE
  524.  .MESSAGE
  525.   %HILITE%
  526.   In order to initialize the environment properly, please remove
  527.   the diskette from the floppy drive and press <CTRL-ALT-DEL>.
  528.   After rebooting, continue the installation by typing ORAINST at
  529.   the DOS prompt.
  530.  
  531. .ENDIF
  532.  
  533. .EXIT
  534.  
  535. .<BOOTHELP>
  536. Please enter the letter (A-Z) corresponding to the drive from which
  537. you boot your computer.  This drive will typically have system files
  538. and information on it.  For most machines, this drive is C.
  539.  
  540. .<SRCDHELP>
  541. Please enter the letter (A-Z) corresponding to the drive from which
  542. you will be installing your ORACLE products.  This drive is usually
  543. a floppy drive, either A or B.
  544.  
  545. .<CONFHELP>
  546. In order to work properly, ORACLE requires that certain system variables
  547. be set to specified values.  Choosing Yes will cause the necessary
  548. changes to be made to your CONFIG.SYS file automatically.  Choosing
  549. No will cause a sample CONFIG.NEW file to be created with the needed
  550. changes made to it.
  551.  
  552. .<AUTOHELP>
  553. In order to work properly, ORACLE requires that certain system variables
  554. be set to specified values.  Choosing Yes will cause the necessary
  555. changes to be made to your AUTOEXEC.BAT file automatically.  Choosing
  556. No will cause a sample AUTOEXEC.NEW file to be created with the needed
  557. changes made to it.
  558.  
  559. .<HOMEHELP>
  560. Please enter the FULL path (drive and directory name) where you wish
  561. to install ORACLE.  Your response should be similar in form to:
  562. C:\ORACLE5
  563.  
  564.