#!/sbin/sh
########################################
#  Product: HPUXOpenSSL
#  Fileset: Latest
#  Preinstall 
#  (c) Copyright Hewlett-Packard Company
####################################
UTILS="/usr/lbin/sw/control_utils"
    if [[ ! -f $UTILS ]]
    then
        echo "ERROR: Cannot find $UTILS"
        exit 1
    fi
    . $UTILS
exitval=$SUCCESS
#########################################
# Removing previous version source files
#########################################

if [[ -d /opt/openssl/src ]]
then
	rm -rf /opt/openssl/src 1>/dev/null 2>/dev/null
fi

if [[ -d /opt/openssl/0.9.7/src ]]
then
	rm -f /opt/openssl/0.9.7/src/openssl*.tar.gz
fi

if [[ -d /opt/openssl/0.9.8/src ]]
then
	rm -f /opt/openssl/0.9.8/src/openssl*.tar.gz
fi

#if [[ -d /opt/openssl/fips/src ]]
#then
#	rm -rf /opt/openssl/fips/src 1>/dev/null 2>/dev/null
#fi

####################################
exit $exitval
####################################
