home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a524 / 27.ddi / install / plus.install < prev    next >
Encoding:
Text File  |  1991-03-04  |  4.4 KB  |  190 lines

  1. :
  2. #
  3. #  $Header: sqlplus.in.pp.120,v 6.38 89/09/22 02:22:59 dosterbe Exp $ base sqlplus sqlplus/install sqlplus.in.pp 120 Copyr (c) 1988 Oracle Corporation 
  4. #
  5.  
  6. #
  7. #  plus.install
  8. #
  9. #  This is the installation script to install SQL*Plus on a
  10. #  UNIX ORACLE system.
  11. #
  12. #  It can be invoked by the master installation script, oracle.install,
  13. #  or as a stand alone procedure.
  14. #
  15. #  The master script, oracle.install, sets ORACLE_HOME, 
  16. #  and LOG before it runs this script.
  17. #  If the script is run stand-alone, then these variables must be set and
  18. #  exported before it is run.
  19. #
  20. #  Default answers are shown in square brackets.
  21. #
  22.  
  23. NETLIBNAME="nsl_s"
  24. PHYS_BLK_SIZE=2048  
  25. VNDR_NETLIBS="-lnsl_s "
  26. CHOWN=/bin/chown
  27. MAKE=make        
  28. ORACLE_LPPROG="/usr/bin/lp"
  29. ORACLE_PAGER="/usr/bin/more"
  30. ORACLE_LPSTAT="/usr/bin/lpstat"
  31.  
  32. #
  33. #  Initialize variables used in installation script.
  34. #
  35. PRODUCT=SQLPLUS
  36. product=sqlplus
  37. MKTG_NAME=SQL*Plus
  38. SILENT=-s
  39.  
  40. #set up for make (assume Forms is not desired)
  41. INSTALL=install
  42.  
  43. #
  44. #  Setup  the environment variables for the installation script.
  45. #
  46. . $ORACLE_HOME/install/setup.ins
  47.  
  48. #
  49. # Protect bin directory
  50. #
  51. cd $ORACLE_HOME/bin
  52.  
  53. #
  54. # "install" user scripts
  55. #
  56. chmod 755 demobld demodrop 2>/dev/null
  57.  
  58. #
  59. # "install" user utilities
  60. #
  61. chmod 751 sqlplus 2>/dev/null
  62.  
  63. #FILE_LIST=`cat $ORACLE_HOME/${product}/install/${PRODUCT}.DIST`
  64.  
  65. #
  66. # Link sqlplus (in the lib directory) and put it into the bin directory.
  67. #
  68. if [ "$LINK_PRODUCT" = "T" ] ; then
  69.   cd $ORACLE_HOME/${product}/lib
  70.  
  71. #
  72. # Link with forms if desired
  73. #
  74.  
  75. # check for forms library
  76. #
  77.   if [  -f $ORACLE_HOME/forms/lib/libforms.a ] ; then
  78.  
  79.      echo ""
  80.      echo "You can optionally link SQL*Forms in to $MKTG_NAME (RUNFORM command)."
  81.      echo $N "Do you want SQL*Forms linked in? $C"
  82.      DEFLT=N; . $INSTALL_HOME/read.sh; ANS="$RDVAR"
  83.      case $ANS in
  84.         Y | y)
  85.             INSTALL=installF
  86.  
  87.             ;;
  88.       esac
  89. fi    
  90.   echo ""
  91.   echo "Linking and installing $MKTG_NAME executables..." | tee -a $LOG
  92.   echo ""
  93.   $MAKE -f *plus.mk  ORACLE_HOME=$ORACLE_HOME $INSTALL >> $LOG 2>&1
  94.   if [ $? = 0 ] ; then
  95.       case $SUPER_USER in
  96.          TRUE)    $CHOWN $ORACLE_OWNER $ORACLE_HOME/bin/sqlplus ;;
  97.       esac
  98.   else
  99.       echo "
  100.     Relinking Error.
  101.     The executable for $MKTG_NAME was not made successfully.
  102.     Please check the log file, and repeat the installation
  103.     procedure for $MKTG_NAME.
  104.     " | tee -a $LOG
  105.   fi
  106. fi
  107.  
  108. #
  109. #  Install glogin.sql
  110. #
  111. if [ "$UPDATE" != "Y" ] ; then
  112.    echo "rem  SQL*Plus global login startup file.
  113.    rem
  114.    rem  This is the global login file for SQL*Plus.
  115.    rem  Add any sqlplus commands here that are to be 
  116.    rem  executed when a user invokes sqlplus"  > \
  117.         $ORACLE_HOME/dbs/glogin.sql 2>> $LOG
  118.    case $SUPER_USER in
  119.       TRUE)    $CHOWN $ORACLE_OWNER $ORACLE_HOME/dbs/glogin.sql ;;
  120.    esac
  121. fi
  122.  
  123. #
  124. #  Perform steps required to install help facility for this product.
  125. #
  126. echo ""
  127. echo "The $MKTG_NAME help facility will occupy 1500 blocks in the database."
  128. echo $N "Do you want to load the help facility? $C"
  129. DEFLT=Y; . $INSTALL_HOME/read.sh; ANS="$RDVAR"
  130. case $ANS in
  131.     Y|y)  echo "Loading $MKTG_NAME help facility (helpins)..." | tee -a $LOG
  132.       echo "This may take several minutes."
  133.       cd $ORACLE_HOME/${product}
  134.       sh $ORACLE_HOME/bin/helpins >> $LOG 2>&1 ;;
  135. esac
  136. case $SUPER_USER in
  137.     TRUE)    $CHOWN $ORACLE_OWNER *.lis help/*.log ;;
  138. esac
  139.  
  140. #
  141. #  Perform steps required to install product user profile table
  142. #
  143. $ORACLE_HOME/bin/pupbld
  144.  
  145. #
  146. #  Perform steps required to install demo for this product.
  147. #
  148. if [ "$UPDATE" != "Y" ] ; then
  149.    echo ""
  150.    echo "Loading $MKTG_NAME SCOTT/TIGER demonstration database." | tee -a $LOG
  151.    echo "This may take several minutes..."
  152.    echo ""
  153.  
  154.    sqlplus $SILENT $SYSTEM_PASS <<! >> $LOG 2>&1
  155.    grant connect,resource to scott identified by tiger;
  156.    connect scott/tiger
  157.     start ?/sqlplus/demo/demobld
  158. !
  159. fi
  160.  
  161. #
  162. #  Use "touch" to time stamp hidden file, for future verification of 
  163. #  product installation.
  164. touch "$ORACLE_HOME/$product/install/.$product" 2> /dev/null
  165.  
  166. #
  167. #  Hook for verification scripts -- this must happen last
  168. #
  169. case $ORACLE_VERIFY in
  170.     T)    if [ -f $ORACLE_HOME/$product/install/plus.verify ] ; then
  171.         ORACLE_INSTALL=T ; export ORACLE_INSTALL
  172.         chmod 755 $ORACLE_HOME/$product/install/plus.verify
  173.         $ORACLE_HOME/$product/install/plus.verify
  174.     fi ;;
  175. esac
  176.  
  177. #
  178. #  Do any cleanup and exit this script.
  179. #
  180. echo ""
  181. case $UPDATE in
  182.     Y) echo "$MKTG_NAME update completed." | tee -a $LOG ;;
  183.     *) echo "$MKTG_NAME installation completed." | tee -a $LOG ;;
  184. esac
  185. echo ""
  186. sync;sync;sync
  187. exit 0
  188.  
  189.