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

# postpatch no longer attempts to start SEM after patch install.
#    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
