#!/bin/sh
#
# Copyright 08/13/02 Sun Microsystems, Inc.  All rights reserved.
#
# @(#)prepatch	1.7 02/08/13 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

exit 0
