home *** CD-ROM | disk | FTP | other *** search
- :
- #
- # $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
- #
-
- #
- # plus.install
- #
- # This is the installation script to install SQL*Plus on a
- # UNIX ORACLE system.
- #
- # It can be invoked by the master installation script, oracle.install,
- # or as a stand alone procedure.
- #
- # The master script, oracle.install, sets ORACLE_HOME,
- # and LOG before it runs this script.
- # If the script is run stand-alone, then these variables must be set and
- # exported before it is run.
- #
- # Default answers are shown in square brackets.
- #
-
- NETLIBNAME="nsl_s"
- PHYS_BLK_SIZE=2048
- VNDR_NETLIBS="-lnsl_s "
- CHOWN=/bin/chown
- MAKE=make
- ORACLE_LPPROG="/usr/bin/lp"
- ORACLE_PAGER="/usr/bin/more"
- ORACLE_LPSTAT="/usr/bin/lpstat"
-
- #
- # Initialize variables used in installation script.
- #
- PRODUCT=SQLPLUS
- product=sqlplus
- MKTG_NAME=SQL*Plus
- SILENT=-s
-
- #set up for make (assume Forms is not desired)
- INSTALL=install
-
- #
- # Setup the environment variables for the installation script.
- #
- . $ORACLE_HOME/install/setup.ins
-
- #
- # Protect bin directory
- #
- cd $ORACLE_HOME/bin
-
- #
- # "install" user scripts
- #
- chmod 755 demobld demodrop 2>/dev/null
-
- #
- # "install" user utilities
- #
- chmod 751 sqlplus 2>/dev/null
-
- #FILE_LIST=`cat $ORACLE_HOME/${product}/install/${PRODUCT}.DIST`
-
- #
- # Link sqlplus (in the lib directory) and put it into the bin directory.
- #
- if [ "$LINK_PRODUCT" = "T" ] ; then
- cd $ORACLE_HOME/${product}/lib
-
- #
- # Link with forms if desired
- #
-
- #
- # check for forms library
- #
- if [ -f $ORACLE_HOME/forms/lib/libforms.a ] ; then
-
- echo ""
- echo "You can optionally link SQL*Forms in to $MKTG_NAME (RUNFORM command)."
- echo $N "Do you want SQL*Forms linked in? $C"
- DEFLT=N; . $INSTALL_HOME/read.sh; ANS="$RDVAR"
- case $ANS in
- Y | y)
- INSTALL=installF
-
- ;;
- esac
- fi
- echo ""
- echo "Linking and installing $MKTG_NAME executables..." | tee -a $LOG
- echo ""
- $MAKE -f *plus.mk ORACLE_HOME=$ORACLE_HOME $INSTALL >> $LOG 2>&1
- if [ $? = 0 ] ; then
- case $SUPER_USER in
- TRUE) $CHOWN $ORACLE_OWNER $ORACLE_HOME/bin/sqlplus ;;
- esac
- else
- echo "
- Relinking Error.
- The executable for $MKTG_NAME was not made successfully.
- Please check the log file, and repeat the installation
- procedure for $MKTG_NAME.
- " | tee -a $LOG
- fi
- fi
-
- #
- # Install glogin.sql
- #
- if [ "$UPDATE" != "Y" ] ; then
- echo "rem SQL*Plus global login startup file.
- rem
- rem This is the global login file for SQL*Plus.
- rem Add any sqlplus commands here that are to be
- rem executed when a user invokes sqlplus" > \
- $ORACLE_HOME/dbs/glogin.sql 2>> $LOG
- case $SUPER_USER in
- TRUE) $CHOWN $ORACLE_OWNER $ORACLE_HOME/dbs/glogin.sql ;;
- esac
- fi
-
- #
- # Perform steps required to install help facility for this product.
- #
- echo ""
- echo "The $MKTG_NAME help facility will occupy 1500 blocks in the database."
- echo $N "Do you want to load the help facility? $C"
- DEFLT=Y; . $INSTALL_HOME/read.sh; ANS="$RDVAR"
- case $ANS in
- Y|y) echo "Loading $MKTG_NAME help facility (helpins)..." | tee -a $LOG
- echo "This may take several minutes."
- cd $ORACLE_HOME/${product}
- sh $ORACLE_HOME/bin/helpins >> $LOG 2>&1 ;;
- esac
- case $SUPER_USER in
- TRUE) $CHOWN $ORACLE_OWNER *.lis help/*.log ;;
- esac
-
- #
- # Perform steps required to install product user profile table
- #
- $ORACLE_HOME/bin/pupbld
-
- #
- # Perform steps required to install demo for this product.
- #
- if [ "$UPDATE" != "Y" ] ; then
- echo ""
- echo "Loading $MKTG_NAME SCOTT/TIGER demonstration database." | tee -a $LOG
- echo "This may take several minutes..."
- echo ""
-
- sqlplus $SILENT $SYSTEM_PASS <<! >> $LOG 2>&1
- grant connect,resource to scott identified by tiger;
- connect scott/tiger
- start ?/sqlplus/demo/demobld
- !
- fi
-
- #
- # Use "touch" to time stamp hidden file, for future verification of
- # product installation.
- touch "$ORACLE_HOME/$product/install/.$product" 2> /dev/null
-
- #
- # Hook for verification scripts -- this must happen last
- #
- case $ORACLE_VERIFY in
- T) if [ -f $ORACLE_HOME/$product/install/plus.verify ] ; then
- ORACLE_INSTALL=T ; export ORACLE_INSTALL
- chmod 755 $ORACLE_HOME/$product/install/plus.verify
- $ORACLE_HOME/$product/install/plus.verify
- fi ;;
- esac
-
- #
- # Do any cleanup and exit this script.
- #
- echo ""
- case $UPDATE in
- Y) echo "$MKTG_NAME update completed." | tee -a $LOG ;;
- *) echo "$MKTG_NAME installation completed." | tee -a $LOG ;;
- esac
- echo ""
- sync;sync;sync
- exit 0
-
-