#!/bin/sh

# This scripts checks to see if CT ver 4.0 is installed and active. 
# If it is active print a warning and exit
#

if [ -h /opt/SUNWhpc/bin ]; then        # link is here, get version
        AVER=`ls -l /opt/SUNWhpc/bin 2>/dev/null | \
        sed 's/\(.*\)\(HPC\)\([0-9]\.[0-9]\)\(.*\)/\3/'`
fi

if [ "$AVER" = "4.0" ]; then
        echo ""
        echo "** HPC CT 4.0 MUST be deactivated before applying this patch"
        echo "** run: hpc_reconfigure -d 4.0 -c <config_dir>"
        echo ""
        exit 1
fi

exit 0

