#!/bin/sh

####################################################################
#                                                                  #
# Shell script '#/d23bs/start_ingres'                              #
#                                                                  #
#------------------------------------------------------------------#
#                                                                  #
# Purpose of this script: set some environment variables           #
# and start an executable, e.g. SunOS_ingres, for the connection   #
# to databases.                                                    #
# Must be modified by the user.                                    #
#                                                                  #
# This script will run on the same host as the database.           #
#                                                                  #
# Don't disturb the IPC - don't use commands here, which produce   #
# outputs, e.g. 'echo' .                                           #
#                                                                  #
# FURTHER INFORMATIONS: see file '#/d23bs/ipc.config'.             #
#                                                                  #
####################################################################



# Call correct executable
os=`uname -s`

case $os in
  IRIX   ) 
         II_SYSTEM=/usr/r6                # set variables
         export II_SYSTEM
         INGRES=$II_SYSTEM/ingres
         export INGRES
         PATH=$INGRES/utility:$INGRES/bin:$PATH
         export PATH
         `dirname $0`/${os}_ingres $*;;   # call executable
   HP-UX )        
         II_SYSTEM=/usr1/r64              # set variables
         export II_SYSTEM
         INGRES=$II_SYSTEM/ingres
         export INGRES
         PATH=$INGRES/utility:$INGRES/bin:$PATH
         export PATH
         `dirname $0`/${os}_ingres $*;;    # call executable
   SunOS )        
         II_SYSTEM=/usr1/r64               # set variables
         export II_SYSTEM
         INGRES=$II_SYSTEM/ingres
         export INGRES
         PATH=$INGRES/utility:$INGRES/bin:$PATH
         export PATH
         `dirname $0`/${os}_ingres $*;;    # call executable
   *     )   
         echo "ERROR: connection to INGRES not supported for operating system $os ."; exit 1;;
esac

exit 0
