home *** CD-ROM | disk | FTP | other *** search
- :
- #
- # $Header: otm.in.pp,v 6.10 90/04/18 11:55:16 atam Exp $ otm.in.pp
- #
- #
- # otm.install
- #
- # This is the installation script to install Oracle*Terminal 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
- # ORACLE_SID 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=ORATERM
- product=oraterm
- MKTG_NAME=Oracle*Terminal
-
- #
- # Setup the environment variables for the installation script.
- #
- . $ORACLE_HOME/install/setup.ins
-
- #
- # Check to make sure that Oracle Tool Kit has been installed
- #
- if [ ! -f $ORACLE_HOME/orakit/install/.orakit ] ; then
- echo "
- Error installing $MKTG_NAME. Please install Ora*Kit
- and repeat $MKTG_NAME installation.
- " | tee -a $LOG
- exit 1
- fi
-
- #
- # Set correct protections for resource files
- #
- chmod 644 $ORACLE_HOME/${product}/admin/resource/*.r >> $LOG 2>&1
-
- #
- # Link oraterm (in the lib directory) and put it into the bin directory.
- #
- cd $ORACLE_HOME/${product}/lib
- if [ "$LINK_PRODUCT" = "T" ] ; then
- echo ""
- echo "Linking and installing $MKTG_NAME executables..." | tee -a $LOG
- echo ""
- $MAKE -f oraterm.mk ORACLE_HOME=$ORACLE_HOME install >> $LOG 2>&1
- if [ $? != 0 ] ; then
- echo "
- Relinking Error.
- The executables for $MKTG_NAME were not made successfully.
- Please check the log file, and repeat the installation
- procedure for $MKTG_NAME.
- " | tee -a $LOG
- fi
- case $SUPER_USER in
- TRUE) cd $ORACLE_HOME/bin
- $CHOWN $ORACLE_OWNER oraterm;;
- esac
- fi
-
- # Go back to oraterm directory
- cd $ORACLE_HOME/${product}
-
- #
- # Need to set environment variable ORAKITPATH for Oracle*Terminal
- #
- echo ""
- echo "Adding ORAKITPATH definitions to .profile and .login files..." | tee -a $LOG
- echo ""
- if grep 'ORAKITPATH=' $ORACLE_HOME/.profile > /dev/null 2>&1 ; then
- if [ "`grep 'ORAKITPATH=.*oraterm/admin/resource' $ORACLE_HOME/.profile \
- 2>/dev/null`" = "" ] ; then
- sed -e \
- '/ORAKITPATH=/s/$/:$ORACLE_HOME\/oraterm\/admin\/resource/' \
- $ORACLE_HOME/.profile > /tmp/.profile$$
- mv /tmp/.profile$$ $ORACLE_HOME/.profile
- fi
- else
- echo 'ORAKITPATH=.:$ORACLE_HOME/oraterm/admin/resource
- export ORAKITPATH' >> $ORACLE_HOME/.profile
- fi
-
- if grep 'ORAKITPATH' $ORACLE_HOME/.login > /dev/null 2>&1 ; then
- if [ "`grep 'ORAKITPATH.*oraterm/admin/resource' $ORACLE_HOME/.login \
- 2>/dev/null`" = "" ] ; then
- sed -e \
- '/ORAKITPATH/s/$/:$ORACLE_HOME\/oraterm\/admin\/resource/' \
- $ORACLE_HOME/.login > /tmp/.login$$
- mv /tmp/.login$$ $ORACLE_HOME/.login
- fi
- else
- echo 'setenv ORAKITPATH .:$ORACLE_HOME/oraterm/admin/resource' >> $ORACLE_HOME/.login
- fi
-
- #
- # Use "touch" to time stamp hidden file, for future verification of
- # product installation.
- touch "$ORACLE_HOME/$product/install/.$product" 2> /dev/null
-
- #
- # 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
-