#!/bin/sh
#
# Copyright 1995-2002 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
#pragma ident	"@(#)checkinstall	1.3	02/11/22 SMI"
#
PATH=/usr/sadm/bin:$PATH

#
# figure out CLASSES to install
#
CLASSES="none"

#
#determine the version of SDS. 
# Classify into 3 group, SLVM, 421 and pre421
#
#Need to check if its an update, ie someone is simply pkgadding because
# a file was deleted.
#

#if we were upgrading from pre SDS 4.2.1, legacy class action script needs to
# be run to create symlinks from old to the new location.

if [ "$UPDATE" != "yes" ]; then
	pkginfo -R ${PKG_INSTALL_ROOT:-/} -q SUNWmd\*;
	if [ $? -eq 0 ]; then
		CLASSES="${CLASSES} legacy"
	fi
fi

#
# export environment variables to install
#
echo CLASSES="${CLASSES}" >> $1

exit 0
