# Copyright (c) 1999 by Sun Microsystems, Inc.
# All rights reserved.
#
# "@(#)checkinstall    1.4    99/09/17     SMI"
# 
# This script does some of the pre installation  tasks for
# AdminSuite 3.0 installation.
#

##############################################################################################

JDK118="1.1.8"
OSRELEASE="5.8"

THIS_OSRELEASE=`/usr/bin/uname -r 2>&1`

JDK1XX_VERSION_STRING=`/usr/java1.1/bin/java -version 2>&1`
 
JDK1XX_VERSION=`echo ${JDK1XX_VERSION_STRING} | cut -c 15- | nawk '{print substr($0,1,5)}'`


# Make sure target system is a 2.8 platform,otherwise abort installation.

if [ "${THIS_OSRELEASE}" != "${OSRELEASE}" ]; then
 
        echo "\nTarget system is not running Solaris 8."
        echo "This package is for Solaris 8 platform only."
        echo "\nThe installation is being terminated.....\n"
          exit 3 
       fi

# Make sure JDK 1.1.8 is installed on target system ,otherwise abort installation.
 
   if [ "${JDK1XX_VERSION}" != "${JDK118}" ]; then

        echo "\nJDK 1.1.8 is not installed on the target system."
        echo "You must install JDK 1.1.8 before you install AdminSute 3.0."
        echo "\nThe installation is being terminated.....\n"  
          exit 3 
       fi
 
################################################################################################
## Done

exit 0
