# This script deletes the used backout data for a patch package
# and removes the deletes file entries.
#
# directory format options.
#
#       @(#)patch_postinstall 1.3 98/07/29 SMI
#
# Copyright (c) 1995 by Sun Microsystems, Inc.
# All rights reserved
#

PATH=/usr/sadm/bin:$PATH
THIS_DIR=`dirname $0`

Our_Deletes=$THIS_DIR/deletes

#
# Delete the used backout data
#
if [ -f $Our_Deletes ]; then
	cat $Our_Deletes | while read path; do
		if valpath -l $path; then
			Client_Path=`echo "$CLIENT_BASEDIR/$path" | sed "s|//|/|"`
		else	# It's an absolute path
			Client_Path=$path
		fi
		rm `removef $PKGINST $Client_Path`
	done
	removef -f $PKGINST

	rm $Our_Deletes
fi

#
# Remove the deletes file, checkinstall and the postinstall
#
rm -r $PKGSAV/$ACTIVE_PATCH
rm -f $THIS_DIR/checkinstall $THIS_DIR/postinstall

echo $BASEDIR
echo $PKG_INSTALL_ROOT
BASEDIR=/opt/VRTSob
REGFILE="$PKG_INSTALL_ROOT/etc/vx/isis/Registry"
REGOPS="/opt/VRTSob/bin/vxregctl"
$REGOPS $REGFILE deletevalue Software/VERITAS/VxSvc/CurrentVersion/ Version
$REGOPS $REGFILE deletevalue Software/VERITAS/VxSvc/CurrentVersion/ClientExtensions/{1d553abd-b067-48be-acdc-2b38152af6d6}/IsisSkin/1/1033 Version
$REGOPS $REGFILE deletevalue Software/VERITAS/VxSvc/CurrentVersion/ClientExtensions/{40146606-24ad-4a7d-9bcb-6e2e9f86b8bf}/IsisSkin/1/1033 Version
$REGOPS $REGFILE deletevalue Software/VERITAS/VxSvc/CurrentVersion/ClientExtensions/{e95e36f4-47f2-4a21-bb71-b2391f223fd2}/IsisSkin/1/1033 Version
$REGOPS $REGFILE setvalue Software/VERITAS/VxSvc/CurrentVersion/ Version REG_SZ 3.0.2.261 2>/dev/null
$REGOPS $REGFILE setvalue Software/VERITAS/VxSvc/CurrentVersion/ClientExtensions/{1d553abd-b067-48be-acdc-2b38152af6d6}/IsisSkin/1/1033 Version REG_SZ 2.1 2>/dev/null
$REGOPS $REGFILE setvalue Software/VERITAS/VxSvc/CurrentVersion/ClientExtensions/{40146606-24ad-4a7d-9bcb-6e2e9f86b8bf}/IsisSkin/1/1033 Version REG_SZ 1.4 2>/dev/null
$REGOPS $REGFILE setvalue Software/VERITAS/VxSvc/CurrentVersion/ClientExtensions/{e95e36f4-47f2-4a21-bb71-b2391f223fd2}/IsisSkin/1/1033 Version REG_SZ 1.3 2>/dev/null
ln /etc/init.d/isisd /etc/rc0.d/K50isisd
ln /etc/init.d/isisd /etc/rc2.d/S50isisd
ln /etc/init.d/isisd /etc/rcS.d/K50isisd
#XXXSpecial_CommandsXXX#
