#! /bin/sh EXEC="org.globus.bootstrap.Bootstrap @class@" DEF_OPTIONS="@default.jvm.options@" DEF_CMD_OPTIONS="@default.cmd.line@" updateOptions() { if [ "X$2" != "X" ] ; then GLOBUS_OPTIONS="$GLOBUS_OPTIONS -D$1=$2" fi } ####### MAIN BODY ########## if [ ! -d "$GLOBUS_LOCATION" ] ; then echo "Error: GLOBUS_LOCATION invalid or not set: $GLOBUS_LOCATION" 1>&2 exit 1 fi LOCALCLASSPATH=$GLOBUS_LOCATION/lib/bootstrap.jar:$GLOBUS_LOCATION/lib/cog-url.jar:$GLOBUS_LOCATION/lib/axis-url.jar ### SETUP OTHER VARIABLES #### updateOptions "GLOBUS_LOCATION" "$GLOBUS_LOCATION" updateOptions "java.endorsed.dirs" "$GLOBUS_LOCATION/endorsed" updateOptions "X509_USER_PROXY" "$X509_USER_PROXY" updateOptions "GLOBUS_HOSTNAME" "$GLOBUS_HOSTNAME" updateOptions "GLOBUS_TCP_PORT_RANGE" "$GLOBUS_TCP_PORT_RANGE" if [ "X$IBM_JAVA_OPTIONS" = "X" ] ; then IBM_JAVA_OPTIONS=-Xquickstart export IBM_JAVA_OPTIONS fi if [ $# -gt 0 ]; then if [ "X${DEF_CMD_OPTIONS}" != "X" ]; then set - ${GLOBUS_OPTIONS} -classpath ${LOCALCLASSPATH} ${EXEC} ${DEF_CMD_OPTIONS} "$@" else set - ${GLOBUS_OPTIONS} -classpath ${LOCALCLASSPATH} ${EXEC} "$@" fi else if [ "X${DEF_CMD_OPTIONS}" != "X" ]; then set - ${GLOBUS_OPTIONS} -classpath ${LOCALCLASSPATH} ${EXEC} ${DEF_CMD_OPTIONS} else set - ${GLOBUS_OPTIONS} -classpath ${LOCALCLASSPATH} ${EXEC} fi fi for i in `echo ${DEF_OPTIONS} |cut -d'-' -f1-` ; do DEFINE=`echo $i|cut -d'=' -f1` VALUE="`eval echo $i|cut -d'=' -f2`" set - $DEFINE="$VALUE" "$@" done ### EXECUTE ############ if [ "X$JAVA_HOME" = "X" ] ; then _RUNJAVA=java else _RUNJAVA="$JAVA_HOME"/bin/java fi exec $_RUNJAVA "$@"