#!/bin/sh
# =====================================================================         
# PROPRIETARY-STATEMENT:                                                        
# Licensed Material - Property of IBM                                           
#                                                                               
# 5724-I63, 5724-H88, 5655-N01, 5733-W61                                        
# (C) Copyright IBM Corp. 1999, 2010                                            
# All Rights Reserved                                                           
# US Government Users Restricted Rights - Use, duplication or                   
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.             
# =====================================================================         
<!-- import documents/data/buildInfo.script -->
# =====================================================================        
#                                                                               
# Initializes the configuration file system.                    
#                                                                              
# =====================================================================        
<!--  Change Activity:                                                -->         
<!--                                                                  -->         
<!-- F908-33863  V8.0  20100913 PDOP: Initial version                 -->
<!-- 676719      V8.0  20101102 PDOP: Escape response file values     -->
<!-- F908-37758  V8.0  20101216 PDOP: Expand directory-level symlinks -->
<!-- 717532      V8.5  20110921 PDOP: Change version to "8.5"         -->
<!-- ================================================================ -->

# Invokes script to initialize the configuration image
'${zSmpePath}/bin/zInitializeConfigImage.sh' \
 -configRoot '${zConfigMountPoint}/${zWasServerDir}' \ 
 -configOwner '${zAdminUserid}' \
 -configGroup '${zConfigurationGroup}' \
 -installRoot '${zSmpePath}' \
 -version 8.5 \
<!-- if (${zEnableIntermediateSymlink} == true) -->
 -intermediateSymlink '${zIntermediateSymlink}' \
<!-- endif -->
 -workDirectory '/tmp/com.ibm.ws390.pmt/${TIMESTMP}'
rc="$?" 

<!-- if (${zExpandSymlinkList}token != token) -->
# Exits if an error occurred initializing the configuration image
if [ "$rc" -ne 0 ]; then
    exit "$rc"
fi 

# Invokes script to expand the specified directory-level symlinks
echo 'Expanding directory-level symbolic links designated by the stacked product'
'${zSmpePath}/bin/zExpandSymlinks.sh' \
<!-- if (${zExpandSymlinkList}token != alltoken) -->
 -symlinks '${zExpandSymlinkList}' \
<!-- endif --> 
 -configRoot '${zConfigMountPoint}/${zWasServerDir}'  
rc="$?" 
if [ "$rc" -ne 0 ]; then
    exit "$rc"
fi 

<!-- if (${zEnable${symlinkSeed}IntermediateSymlink}token == truetoken) -->
# Creates intermediate symbolic link for stacked product
echo 'Creating intermediate symbolic link for stacked product install image'
'${zSmpePath}/bin/createIntermediateSymlink.sh' \
 '${z${symlinkSeed}SmpePath}' \
 '${z${symlinkSeed}IntermediateSymlink}'
rc="$?" 
if [ "$rc" -ne 0 ]; then
    exit "$rc"
fi 
<!-- endif -->

# Invokes stacked product symlink script
echo 'Invoking stacked product symlink script'
'${z${symlinkSeed}SmpePath}/${symlinkScriptPath}' \
<!-- if (${zEnable${symlinkSeed}IntermediateSymlink}token == truetoken) -->
 '${z${symlinkSeed}IntermediateSymlink}' \
<!-- endif -->
<!-- if (${zEnable${symlinkSeed}IntermediateSymlink}token != truetoken) -->                                                      
 '${z${symlinkSeed}SmpePath}' \
<!-- endif -->                                                               
 '${zConfigMountPoint}/${zWasServerDir}'                                               
rc="$?" 
<!-- endif -->                                                               
 
exit "$rc"
                                                                              
