#
# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident	"@(#)postinstall	1.2	07/06/28 SMI"
#

BASEPREFIX=`echo $BASEDIR | /usr/bin/sed "s/[\/\ ]/_/g"`
POOLMANIFEST=`echo pools.xml"$BASEPREFIX" | /usr/bin/cut -c 1-256`

if [ -f /tmp/${POOLMANIFEST} ] && [ -f ${PKG_INSTALL_ROOT}/etc/pooladm.conf ] ; then
	echo "/usr/sbin/svcadm enable svc:/system/pools" >> \
	    ${PKG_INSTALL_ROOT}/var/svc/profile/upgrade
fi

# Cleanup
if [ -f /tmp/${POOLMANIFEST} ] ; then
	/usr/bin/rm -f /tmp/${POOLMANIFEST}
fi
