#!/sbin/sh
#------------------------------------------------------------------#
#
# HPUX_ID: @(#) $Revision: 5.1 $ generated on Mon Mar  9 14:16:59 EST 1998
#
# (c)Copyright 1983-1996 Hewlett-Packard Co.,  All Rights Reserved.
#
#------------------------------------------------------------------#
# SD preinstall script template for 11.X patches.                  #
#------------------------------------------------------------------#
# This file is optional for all 11.X patches.  The purpose of this #
# script is to prepare the system for installation of the patch.   #
#------------------------------------------------------------------#

_PATCHID=PHCO_23966

UTILS="/usr/lbin/sw/control_utils"

if [ ! -f $UTILS ]; then
    echo "ERROR:   Cannot find $UTILS"
    exit 1
fi

. $UTILS
exitval=$SUCCESS

#####
##### Insert any code you may require at this point in the script.
##### Pay attention to the exitval variable and set appropriately
##### in your code.  If you are unsure as to what types of operations
##### are legal in this file and what types aren't, consult the 
##### "Guidelines for SD Control Scripts" document.
#####
##### START_CUSTOMIZATION_HERE


# If the SW-GETTOOLS.SD-AGENT fileset is installed then the binaries
# are replaced with sym-links.  These need to be cleaned up before
# this fileset can be installed.  This is the same behavior that is in
# the SW-GETTOOLS.SD-AGENT preremove script.


if [[ -r /usr/lbin/swagent# ]] && [[ -h /usr/lbin/swagent ]]
then
        rm /usr/lbin/swagent
        mv /usr/lbin/swagent# /usr/lbin/swagent
fi


if [[ -r /usr/sbin/swagentd# ]] && [[ -h /usr/sbin/swagentd ]]
then
        rm /usr/sbin/swagentd
        mv /usr/sbin/swagentd# /usr/sbin/swagentd
fi

exit $exitval

