#!/bin/sh
#
# Copyright 2001-2002 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
#ident	"@(#)preinstall	1.1	02/01/30 SMI"

PATH=/usr/bin
PRODREG=/usr/bin/prodreg

# Exit if prodreg does not exist
[ ! -x "$PRODREG" ] && exit 0

ABI_MNEMONIC=com.sun.eacd.abi
ABI_UNREG="$PRODREG unregister $ABI_MNEMONIC"

ID=`$PRODREG list mnemonic mnemonic id |
	grep -w $ABI_MNEMONIC | sort | head -1 | awk '{print $NF}'`

[ -n "$ID" ] && $ABI_UNREG $ID

exit 0
