#!/bin/sh
#
# Copyright 06/08/05 Sun Microsystems, Inc.  All rights reserved.
#
# @(#)prepatch	1.8 05/06/08 Sun Microsystems, Inc.
#

#
# If the MIS is installed on this machine, then stop it before applying
# the patch.
#

if /usr/bin/pkginfo -q SUNWemmis; then
    installdir=`/usr/bin/pkgparam SUNWemmis BASEDIR`

    #
    # Make sure the runtime environment exists, otherwise the postpatch
    # script will fail.
    #

    #if [ ! -r $installdir/SUNWemrdb/etc/onconfig.em ] ; then
	#echo "You must run em_services -reload before installing this patch."
	#exit 1
    #fi

    $installdir/SUNWconn/em/bin/em_services -force -stop

fi

#
# tar the java classes into tar file so that it can backed out latter.
#

if /usr/bin/pkginfo -q SUNWemjme;then
	installdir=`/usr/bin/pkgparam SUNWemjme BASEDIR`
	cd $installdir/SUNWconn/em/classes
	tar cpf emjme.tar com;
fi

exit 0
