#!/bin/sh
#
#-------------------------------------------------------------------
# PROPRIETARY-STATEMENT:
# Licensed Material - Property of IBM
#
# 5724-I63, 5724-H88, 5655-N01, 5733-W61
# (C) Copyright IBM Corp. 1999, 2011
# All Rights Reserved
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
#                                                                            
# FUNCTION:                                                        
#                                                                            
# This script expands the directory-level symbolic links for the   
# directories populated by the associated SMP/E-based stacked      
# product in preparation to run the symlink script for the stacked
# product.                                                                   
#--------------------------------------------------------------------
<!-- import documents/data/buildInfo.script -->
#--------------------------------------------------------------------
<!--                                                                  -->         
<!-- Change Activity:                                                 -->         
<!--                                                                  -->         
<!-- F908-37758   V8.0 20101216 PDOP: Initial version                 -->
<!-- 687957       V8.0 20110126 PDOP: Add build info                  -->         
<!-- ---------------------------------------------------------------- -->         
     
echo "Expanding directory-level symbolic links for ${productName}"
${zConfigMountPoint}/${zWasServerDir}/bin/zExpandSymlinks.sh \
<!-- if (${zExpandSymlinkList} != all) -->
 -symlinks ${zExpandSymlinkList} \
<!-- endif --> 
 -configRoot ${zConfigMountPoint}/${zWasServerDir}  
rc="$?" 
if [ "$rc" -ne 0 ]; then
	exit "$rc"
fi

# Cleans OSGi caches
echo 'Cleaning OSGi caches'
${zConfigMountPoint}/${zWasServerDir}/bin/osgiCfgInit.sh -all
rc="$?"
if [ "$rc" -ne 0 ]; then
	exit "$rc"
fi

# Cleans class cache (note that clearClassCache.sh does not issue an exit code)
echo 'Cleaning class cache'
${zConfigMountPoint}/${zWasServerDir}/bin/clearClassCache.sh 

exit 0
