_script-util.sh revision 3824
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# CDDL HEADER START
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# The contents of this file are subject to the terms of the
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# Common Development and Distribution License, Version 1.0 only
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# (the "License"). You may not use this file except in compliance
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# with the License.
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# You can obtain a copy of the license at
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# trunk/opends/resource/legal-notices/OpenDS.LICENSE
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# See the License for the specific language governing permissions
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# and limitations under the License.
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# When distributing Covered Code, include this CDDL HEADER in each
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# file and include the License file at
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# add the following below this CDDL HEADER, with the fields enclosed
f71f7a61dec7c9089378d14493ad564a1dedf0b5neil_a_wilson# by brackets "[]" replaced with your own identifying information:
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# Portions Copyright [yyyy] [name of copyright owner]
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# CDDL HEADER END
a3d3ab94806056d2355afea6fe8daac41059b9fbludovicp# Copyright 2008 Sun Microsystems, Inc.
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson# function that sets the java home
0cf0e19d7abb0e7659df6d191269f96b3ffe7f45neil_a_wilson if test -f "${INSTANCE_ROOT}/lib/set-java-home"
69de0fe5b7ed905860bef5f86937d30cc206ef7dneil_a_wilson if test ${?} -eq 0
014019918f7e3844f558f6159b8d41517254edc2lutoff echo "Please set OPENDS_JAVA_HOME to the root of a Java 5 (or later) installation"
014019918f7e3844f558f6159b8d41517254edc2lutoff echo "or edit the java.properties file and then run the dsjavaproperties script to"
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergara# Determine whether the detected Java environment is acceptable for use.
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergara "${OPENDS_JAVA_BIN}" org.opends.server.tools.InstallDS -t 2> /dev/null
RESULT_CODE=${?}
if test ${RESULT_CODE} -eq 13
elif test ${RESULT_CODE} -ne 0
RESULT_CODE=${?}
if test ${RESULT_CODE} -eq 13
elif test ${RESULT_CODE} -ne 0
export SCRIPT_NAME_ARG
for JAR in ${INSTALL_ROOT}/lib/*.jar
for JAR in ${INSTANCE_ROOT}/lib/*.jar
export CLASSPATH
export INSTANCE_ROOT
export INSTANCE_ROOT