#!/usr/bin/qsh
# // 5639-D57, 5630-A36, 5630-A37, 5724-D18 (C) COPYRIGHT International Business Machines Corp. 1997, 2008
# // The source code for this program is not published or otherwise divested
# // of its trade secrets, irrespective of what has been deposited with the
# // U.S. Copyright Office.
#
#############################################################################################
# This script is inovked by the configuration manager during the
# config action phase. 
#
# Usage: _updateQryWasInstalls
#  
#############################################################################################
. $(/usr/bin/dirname $0)/setupCmdLine

CLASS_PATH="$WAS_CLASSPATH":"WAS_EXT_DIRS":"$WAS_INSTALL_ROOT"/plugins/com.ibm.ws.runtime.os400_6.1.0.jar:"$WAS_INSTALL_ROOT"/plugins/com.ibm.ws.runtime_6.1.0.jar:"$WAS_INSTALL_ROOT"/plugins/com.ibm.ws.emf_2.1.0.jar:"$WAS_INSTALL_ROOT"/plugins/org.eclipse.emf.ecore_2.2.1.v200609210005.jar:"$WAS_INSTALL_ROOT"/plugins/org.eclipse.emf.common_2.2.1.v200609210005.jar

QWAS_OS_VERSION=${QSH_VERSION:0:2}
  
JAVA_DOT_VERSION=

if [ ${QWAS_OS_VERSION} = "V5" ] ; then
     JAVA_DOT_VERSION=-Djava.version=1.5
elif [ ${QWAS_OS_VERSION} = "V6" ] ; then     
     JAVA_DOT_VERSION=-Djava.version=1.5
else # IBM i releases after 6.1 do not support the classic jvm 
     JAVA_HOME=/QOpenSys/QIBM/ProdData/JavaVM/jdk50/32bit
fi

java \
${JAVA_DOT_VERSION} \
-cp ${CLASS_PATH} \
-Dwas.install.root=${WAS_INSTALL_ROOT} \
-Dwas.install.library=${WAS_LIB} \
com.ibm.ws.os400.tools.FixQryWasInstalls