#! /usr/bin/ksh
# @(#)prepatch 1.1.1.1  10 Mar 1997 11:59:15 SMI
# Copyright 1996 Sun Microsystems, Inc.
#
# This prepatch script determins the value of 3 variables of the
# installed package.
#
# Check to see if there is an established response file. There should be!

RESPONSE_FILE=/tmp/response.$PPID
if [[ ! -f $RESPONSE_FILE ]]; then
    echo "No response file. Exiting"
    exit 1
fi

#Set the needed variables
CLASSES=`pkgparam SUNWsjs CLASSES`
ORADIR=`pkgparam SUNWsjs ORADIR`

#Insert the variable vaules into the response file.
cat >> $RESPONSE_FILE <<EOF
CLASSES=$CLASSES
ORADIR=$ORADIR
EOF

exit 0
