#
# $Source: /project/fspro/patch/sol/META/prebackout,v $
# $Id: prebackout,v 1.2.2.1 2003/06/05 23:40:15 hchen Exp $
# $Copyrights: Copyright (c) 2001 - 2003 VERITAS Software Corporation.
# All rights reserved.
# VERITAS, the VERITAS Logo and all other VERITAS product names and
# slogans are trademarks or registered trademarks of VERITAS Software
# Corporation. VERITAS and the VERITAS Logo Reg. U.S. Pat. & Tm. Off.
# Other product names and/or slogans mentioned herein may be trademarks or
# registered trademarks of their respective companies.
#
# UNPUBLISHED - RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF THE UNITED
# STATES.  USE OF A COPYRIGHT NOTICE IS PRECAUTIONARY ONLY AND DOES NOT
# IMPLY PUBLICATION OR DISCLOSURE.
#
# THIS SOFTWARE CONTAINS CONFIDENTIAL INFORMATION AND TRADE SECRETS OF
# VERITAS SOFTWARE.  USE, DISCLOSURE OR REPRODUCTION IS PROHIBITED WITHOUT
# THE PRIOR EXPRESS WRITTEN PERMISSION OF VERITAS SOFTWARE.
#
# The Licensed Software and Documentation are deemed to be "commercial
# computer software" and "commercial computer software documentation" as
# defined in FAR Sections 12.212 and DFARS Section 227.7202.  $
#

#
# Perform prebackout processing for the VRTSfspro patch.
#
message()
{
	echo
	echo "$@"
}

fatalexit()
{
	message "Please fix the problem and re-run patchrm."
	exit 1
}

################################################################
# fspro.sh is the generalized VEA/VRTSfspro configuration script
################################################################
ret=0
if [ -n "$ROOTDIR" ]
then
	if [ -f $ROOTDIR/opt/VRTSfspro/config/fspro.sh ]
	then
		$ROOTDIR/opt/VRTSfspro/config/fspro.sh -p patchrm
	fi
else
	if [ -f /opt/VRTSfspro/config/fspro.sh ]
	then
		/opt/VRTSfspro/config/fspro.sh -p patchrm
	fi
fi
[ "$?" -ne 0 ] && fatalexit

ret=0
if [ -n "$ROOTDIR" ]
then
	if [ -f $ROOTDIR/opt/VRTSfspro/config/patch_config.sh ]
	then
		$ROOTDIR/opt/VRTSfspro/config/patch_config.sh -p patchrm
	fi
else
	if [ -f /opt/VRTSfspro/config/patch_config.sh ]
	then
		/opt/VRTSfspro/config/patch_config.sh -p patchrm
	fi
fi
[ "$?" -ne 0 ] && fatalexit

exit 0
