#!/bin/sh

# WARNING: This files contents will be replaced during fixpack installation,
# changes will not be retained.

IHS_SERVER_ROOT="@@SERVERROOT@@"
. ${IHS_SERVER_ROOT}/bin/gsk_envvars


#  For Debugging the script. If requested, turn on script tracing.
if [ "X$1" = "X-x" ]
then
 set -x
 IHS_IKM_PARMS="${IHS_IKM_PARMS} -Dkeyman.debug=true -Dkeyman.jnitracing=ON -Djava.security.debug=ALL"
 IHS_IKM_DEBUG=1
 shift
fi

IHS_GSK_EXEC=${JAVA_HOME}/bin/ikeyman

if [ X"$IHS_IKM_DEBUG" = "X" ]; then
  exec $IHS_GSK_EXEC -DADD_CMS_SERVICE_PROVIDER_ENABLED=true -Djava.security.properties=$IHS_SERVER_ROOT/conf/java.security.append $IHS_IKM_PARMS "$@"
else
  cd /tmp
  exec $IHS_GSK_EXEC -DADD_CMS_SERVICE_PROVIDER_ENABLED=true -Djava.security.properties=$IHS_SERVER_ROOT/conf/java.security.append  $IHS_IKM_PARMS "$@" >ikeyman_stdout.txt 2> ikeyman_jce.txt
  cd -
fi

exec $IHS_GSK_EXEC $IHS_IKM_PARMS;

