#!/ibin/sh
#******************************************************************************
#                      OpenSLP documentation pkg script
#-----------------------------------------------------------------------------
#  The package-level install script for the OpenSLP Documentation Package
#-----------------------------------------------------------------------------
#
#       Copyright (C) 2001 Caldera, Inc.
#               All Rights Reserved.
#
#       The information in this file is provided for the exclusive use of
#       the licensees of Caldera, Inc.  Such users have the right to use,
#       modify, and incorporate this code into other products for
#       purposes authorized by the license agreement provided they include
#       this notice and the associated copyright notice with any such product.
#       The information in this file is provided "AS IS" without warranty.
#
#-----------------------------------------------------------------------------
#       input:
#           $1 is the name of the step
#           $2 is the keyword list (e.g., UPGRADE)
#           $3 is the package list
#=============================================================================

# Read arguments into variables
scriptname="$0"
step="$1"
keywords="$2"
pkglist="$3"

CNTLDIR="${SSO_SHARED_ROOT}"/cntl
LOGFILE=/var/tmp/OpenSLP.log

# Source in the standard functions library, ccsSetup.sh
. /ibin/ccsSetup.sh

[ -n "$debug" ] && echo "$scriptname $step \"$keywords\" $pkglist" >> $LOGFILE

# Check $IQM_FILE to determine how custom was invoked and the installation
# type. If IQM_FILE exists, source it in
#
customMode=LAYERED
[ "$IQM_FILE" ] && {
                # Invoking custom from the IQM.  IQM output will be stored
                # in $IQM_FILE.
                customMode="IQM"
                . $IQM_FILE
}

# Set global variables indicating whether this is an upgrade or removal.

sso_upgrade=
old_upgrade=
for word in $keywords
do
    case "$word" in 
        UPGRADE) sso_upgrade=TRUE
                 ;;
        OLD_CUSTOM_UPGRADE) old_upgrade=TRUE
                 ;;
    esac
done

# get data from cqs
if [ -f "${CCS_PERSISTENT_STORAGE}/config_info" ]; then
    . "${CCS_PERSISTENT_STORAGE}/config_info"
fi

#=========================================================================
#  doPreLoad
#=========================================================================

doPreLoad()
{
	[ -n "$debug" ] && echo "Entering doPreLoad" >> $LOGFILE
	[ -n "$debug" ] && echo "Leaving doPreLoad" >> $LOGFILE
}

#=========================================================================
#  doPostLoad
#=========================================================================

doPostLoad()
{
	[ -n "$debug" ] && echo "Entering doPostLoad" >> $LOGFILE
	[ -n "$debug" ] && echo "Leaving doPostLoad" >> $LOGFILE
}

#=========================================================================
#  doPreUnLoad
#=========================================================================

doPreUnLoad()
{
	[ -n "$debug" ] && echo "Entering doPreUnLoad" >> $LOGFILE
	[ -n "$debug" ] && echo "Leaving doPreUnLoad" >> $LOGFILE
}

#=========================================================================
#  doPostUnLoad
#=========================================================================

doPostUnLoad()
{
	[ -n "$debug" ] && echo "Entering doPostUnLoad" >> $LOGFILE
	[ -n "$debug" ] && echo "Leaving doPostUnLoad" >> $LOGFILE
}

#=========================================================================
#  doPreAttach
#=========================================================================

doPreAttach()
{
	[ -n "$debug" ] && echo "Entering doPreAttach" >> $LOGFILE
	[ -n "$debug" ] && echo "Leaving doPreAttach" >> $LOGFILE
}

#=========================================================================
#  doPostAttach
#=========================================================================

doPostAttach()
{
	[ -n "$debug" ] && echo "Entering doPostAttach" >> $LOGFILE
	[ -n "$debug" ] && echo "Leaving doPostAttach" >> $LOGFILE
}

#=========================================================================
#  doPreUnAttach
#=========================================================================

doPreUnAttach()
{
	[ -n "$debug" ] && echo "Entering doPreUnAttach" >> $LOGFILE
	[ -n "$debug" ] && echo "Leaving doPreUnAttach" >> $LOGFILE
}

#=========================================================================
#  doPostUnAttach
#=========================================================================

doPostUnAttach()
{
	[ -n "$debug" ] && echo "Entering doPostUnAttach" >> $LOGFILE
	[ -n "$debug" ] && echo "Leaving doPostUnAttach" >> $LOGFILE
}

#=========================================================================
#  doPreRegister
#=========================================================================

doPreRegister()
{
	[ -n "$debug" ] && echo "Entering doPreRegister" >> $LOGFILE
	[ -n "$debug" ] && echo "Leaving doPreRegister" >> $LOGFILE
}

#=========================================================================
#  doPostRegister
#=========================================================================

doPostRegister()
{
	[ -n "$debug" ] && echo "Entering doPostRegister" >> $LOGFILE
	[ -n "$debug" ] && echo "Leaving doPostRegister" >> $LOGFILE
}

#=========================================================================
#  doPreUnRegister
#=========================================================================

doPreUnRegister()
{
	[ -n "$debug" ] && echo "Entering doPreUnRegister" >> $LOGFILE
	[ -n "$debug" ] && echo "Leaving doPreUnRegister" >> $LOGFILE
}

#=========================================================================
#  doPostUnRegister
#=========================================================================

doPostUnRegister()
{
	[ -n "$debug" ] && echo "Entering doPostUnRegister" >> $LOGFILE
	[ -n "$debug" ] && echo "Leaving doPostUnRegister" >> $LOGFILE
}

#=========================================================================
#  doPreConfigure
#=========================================================================

doPreConfigure()
{
	[ -n "$debug" ] && echo "Entering doPreConfigure" >> $LOGFILE
	[ -n "$debug" ] && echo "Leaving doPreConfigure" >> $LOGFILE
}

#=========================================================================
#  doPostConfigure
#=========================================================================

doPostConfigure()
{
	[ -n "$debug" ] && echo "Entering doPostConfigure" >> $LOGFILE
	[ -n "$debug" ] && echo "Leaving doPostConfigure" >> $LOGFILE
}

#=========================================================================
#  doPreUnConfigure
#=========================================================================

doPreUnConfigure()
{
	[ -n "$debug" ] && echo "Entering doPreUnConfigure" >> $LOGFILE
	[ -n "$debug" ] && echo "Leaving doPreUnConfigure" >> $LOGFILE
}

#=========================================================================
#  doPostUnConfigure
#=========================================================================

doPostUnConfigure()
{
	[ -n "$debug" ] && echo "Entering doPostUnConfigure" >> $LOGFILE
	[ -n "$debug" ] && echo "Leaving doPostUnConfigure" >> $LOGFILE
}

#=========================================================================
#  doPreExport
#=========================================================================

doPreExport()
{
	[ -n "$debug" ] && echo "Entering doPreExport" >> $LOGFILE
	[ -n "$debug" ] && echo "Leaving doPreExport" >> $LOGFILE
}

#=========================================================================
#  doPostExport
#=========================================================================

doPostExport()
{
	[ -n "$debug" ] && echo "Entering doPostExport" >> $LOGFILE
	[ -n "$debug" ] && echo "Leaving doPostExport" >> $LOGFILE
}

#=========================================================================
#  doPreUnExport
#=========================================================================

doPreUnExport()
{
	[ -n "$debug" ] && echo "Entering doPreUnExport" >> $LOGFILE
	[ -n "$debug" ] && echo "Leaving doPreUnExport" >> $LOGFILE
}

#=========================================================================
#  doPostUnExport
#=========================================================================

doPostUnExport()
{
	[ -n "$debug" ] && echo "Entering doPostUnExport" >> $LOGFILE
	[ -n "$debug" ] && echo "Leaving doPostUnExport" >> $LOGFILE
}

#====================================================================== INT ===
#  main --
#
#------------------------------------------------------------------------------


# the exit value from this script
ccs_return_value=0

# PLACEHOLDER - not currently used.
# 
# # This must be a fresh install or upgrade
# # These fns get called prior to running package-specific scripts.
# case "$step" in
# 	PRE_LOAD) doPreLoad;;
# 	POST_LOAD) doPostLoad;;
# 	PRE_UNLOAD) doPreUnLoad;;
# 	POST_UNLOAD) doPostUnLoad;;
# 	PRE_ATTACH) doPreAttach;;
# 	POST_ATTACH) doPostAttach;;
# 	PRE_UNATTACH) doPreUnAttach;;
# 	POST_UNATTACH) doPostUnAttach;;
# 	PRE_REGISTER) doPreRegister;;
# 	POST_REGISTER) doPostRegister;;
# 	PRE_UNREGISTER) doPreUnRegister;;
# 	POST_UNREGISTER) doPostUnRegister;;
# 	PRE_CONFIGURE) doPreConfigure;;
# 	POST_CONFIGURE) doPostConfigure;;
# 	PRE_UNCONFIGURE) doPreUnConfigure;;
# 	POST_UNCONFIGURE) doPostUnConfigure;;
#         PRE_EXPORT) doPreExport;;
#         POST_EXPORT) doPostExport;;
#         PRE_UNEXPORT) doPreUnExport;;
#         POST_UNEXPORT) doPostUnExport;;
# esac

[ -n "$debug" ] && echo "$0 exit $ccs_return_value" >> $LOGFILE
exit $ccs_return_value
