#!/bin/sh
#
# $Source$
# $Id$
# $Copyrights$
#

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

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

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

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

# This is very clumsy!!! We do registry meddling for search client
# version as well as moving search client and search provider to
# common isis dir in fspro.sh during pkgadd/pkgrm. We do the
# registry meddling for search client version aslo in fspro.sh
# during patchadd and patchrm. For patchrm, restoring the searchprovider.so
# and the search client jars in the common isis dirs have to be
# done AFTER patch is backed out and that too with the copies of
# them backed up during patchadd. Since we had too do that in
# postbackout, to be symmetric, we do the overwrite here in postpatch!
# (Atually with pkg too has such mechanism so we can install in
# isis dirs on pkgadd)
#

BASEDIR=$ROOTDIR/
OBBASE=$ROOTDIR/opt/VRTSob
FSPROBASE=$BASEDIR/opt/VRTSfspro

cp $FSPROBASE/lib/searchprovider.so $OBBASE/lib/searchprovider.so 2>/dev/null
cp $FSPROBASE/extensions/VxSearchCE.jar $OBBASE/extensions/VxSearch/IsisSkin/java/1033/VxSearchCE.jar 2>/dev/null
cp $FSPROBASE/extensions/SearchResourceBundle.en.jar $OBBASE/extensions/VxSearch/IsisSkin/java/1033/SearchResourceBundle.en.jar 2>/dev/null

exit 0
