#! /bin/sh
#
# Copyright 1996-1999,2001-2003 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#

###########################################################################
#
# postbackout script.
#
#	* 4857417: Remove file /etc/rcS.d/S68did_update_vfstab created by
#                  postinstall script but not removed if patch is uninstalled
#                  prior to a reconfig reboot. This part was taken from the
#                  SUNWscr/postremove script.
#
###########################################################################

PATH=/usr/bin:/usr/sbin
export PATH

TMPFILES=/etc/rcS.d/S68did_update_vfstab

###########################################
#
# Cleanup any temporary files on exit/interrupt
#
###########################################
cleanup()
{
	exit_code=$1

	if [ "${TMPFILES}" ]; then
		rm -f ${TMPFILES}
	fi

	exit ${exit_code}
}

#
###########################################
#
# main
#
###########################################
errs=0

# catch common signals
trap 'echo "${PROG}: caught signal";  cleanup 3' 1 2 3 15

if [ ${errs} -ne 0 ]; then
	cleanup 1
else
	cleanup 0
fi
