#!/bin/sh
#
# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident	"@(#)preremove	1.3	08/03/18 SMI"

PATH=/usr/bin:/usr/sbin

if [ "$BASEDIR" = "/" ]; then
	#
	# Make sure there are no solaris8 branded zones.
	#
	zoneadm list -cp | nawk -F: '{if ($6 == "solaris8") exit 1}'
	if [ $? -ne 0 ]; then
		echo "There are solaris8 branded zones configured; " \
		    "unable to remove package."
		exit 1
	fi
fi

exit 0
