#!/bin/sh
# =====================================================================         
# PROPRIETARY-STATEMENT:                                                        
# Licensed Material - Property of IBM                                           
#                                                                               
# 5724-I63, 5724-H88, 5655-N01, 5733-W61                                        
# (C) Copyright IBM Corp. 1999, 2013                                            
# 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 -->
# =====================================================================        
#                                                                               
# Create and mount the deployment manager and application server 
# configuration file systems.                    
#                                                                            
# Note: To create a configuration file system without mounting it,           
# delete the -mountpoint argument.                                                     
#                                                                              
# =====================================================================        
<!--  Change Activity:                                                -->         
<!--                                                                  -->         
<!-- F908-33863  V8.0  20100913 PDOP: Initial version                 -->
<!-- 676719      V8.0  20101102 PDOP: Escape response file values     -->
<!-- 679061      V8.0  20101117 PDOP: Verify script files exist       -->
<!-- 739067    V8.5.5  20121129 PDOP: TMPDIR support(renamed BBO855CC)-->
<!-- ================================================================ -->

# Verifies that the deployment manager create config file system script exists
if [[ ! -f '${zSmpePath}/bin/zCreateConfigFileSystem.sh' ]]; then
	echo 'ERROR: The bin/zCreateConfigFileSystem.sh file does not exist within the'
	echo '       specified deployment manager install image:'
	echo '       ${zSmpePath}'
	echo '       Most likely the deployment manager install path is not correct.'
	exit 8
fi

# Verifies that the application server create config file system script exists
if [[ ! -f '${zAppServerSmpePath}/bin/zCreateConfigFileSystem.sh' ]]; then
	echo 'ERROR: The bin/zCreateConfigFileSystem.sh file does not exist within the'
	echo '       specified application server install image:'
	echo '       ${zAppServerSmpePath}'
	echo '       Most likely the application server install path is not correct.'
	exit 8
fi

# Invokes script to create and mount the deployment manager configuration
# file system
echo Creating the deployment manager configuration file system
'${zSmpePath}/bin/zCreateConfigFileSystem.sh' \
 -fileSystemType '${zFilesystemType}' \
 -fileSystemName '${zConfigHfsName}' \
 -primaryCylinders '${zConfigHfsPrimaryCylinders}' \
 -secondaryCylinders '${zConfigHfsSecondaryCylinders}' \
<!-- if (${zConfigHfsVolume} != *) -->
 -volume '${zConfigHfsVolume}' \
<!-- endif -->
 -mountPoint '${zConfigMountPoint}' \
 -configOwner '${zAdminUserid}' \
 -configGroup '${zConfigurationGroup}'
rc="$?" 
if [ "$rc" -ne 0 ]; then
    exit "$rc"
fi
echo Deployment manager configuration file system successfully created 
 
# Invokes script to create and mount the application server configuration
# file system
echo Creating the application server configuration file system
'${zAppServerSmpePath}/bin/zCreateConfigFileSystem.sh' \
 -fileSystemType '${zAppServerFilesystemType}' \
 -fileSystemName '${zAppServerConfigHfsName}' \
 -primaryCylinders '${zAppServerConfigHfsPrimaryCylinders}' \
 -secondaryCylinders '${zAppServerConfigHfsSecondaryCylinders}' \
<!-- if (${zAppServerConfigHfsVolume} != *) -->
 -volume '${zAppServerConfigHfsVolume}' \
<!-- endif -->
 -mountPoint '${zAppServerConfigMountPoint}' \
 -configOwner '${zAdminUserid}' \
 -configGroup '${zConfigurationGroup}'
rc="$?"
if [ "$rc" -ne 0 ]; then
    exit "$rc"
fi
echo Application server configuration file system successfully created 

exit 0
                                                                              
