setup revision 37f9a536593b696e5a3dcec443e1475f22fb5afd
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# CDDL HEADER START
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# The contents of this file are subject to the terms of the
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg# Common Development and Distribution License, Version 1.0 only
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# (the "License"). You may not use this file except in compliance
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# with the License.
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# You can obtain a copy of the license at
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# trunk/opends/resource/legal-notices/OpenDS.LICENSE
0662ed52e814f8f08ef0e09956413a792584eddffuankg# See the License for the specific language governing permissions
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# and limitations under the License.
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# When distributing Covered Code, include this CDDL HEADER in each
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# file and include the License file at
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# add the following below this CDDL HEADER, with the fields enclosed
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# by brackets "[]" replaced with your own identifying information:
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# Portions Copyright [yyyy] [name of copyright owner]
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# CDDL HEADER END
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# Portions Copyright 2006-2007 Sun Microsystems, Inc.
44f575c8cb19a7a5cd61664a7848be6bc197df02fuankg# Capture the current working directory so that we can change to it later.
44f575c8cb19a7a5cd61664a7848be6bc197df02fuankg# Then capture the location of this script and the Directory Server instance
16b55a35cff91315d261d1baa776138af465c4e4fuankg# root so that we can use them to create appropriate paths.
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholescd "${WORKING_DIR}"
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# See if the environment variables are set. If not, then see if there is a java
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# executable in the path and try to figure it out.
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesif test -z "${OPENDS_JAVA_BIN}"
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes if test -z "${OPENDS_JAVA_HOME}"
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes if test -f "${INSTANCE_ROOT}/lib/set-java-home"
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes . "${INSTANCE_ROOT}/lib/set-java-home"
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes if test -z "${JAVA_BIN}"
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes if test -z "${JAVA_HOME}"
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes echo "Please set OPENDS_JAVA_HOME to the root of a Java 5 (or later) installation."
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# Explicitly set the PATH, LD_LIBRARY_PATH, LD_PRELOAD, and other important
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# system environment variables for security and compatibility reasons.
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesexport PATH LD_LIBRARY_PATH LD_LIBRARY_PATH_32 LD_LIBRARY_PATH_64 \
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# Configure the appropriate CLASSPATH.
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# Determine whether the detected Java environment is acceptable for use.
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesif test -z "${JAVA_ARGS}"
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes "${OPENDS_JAVA_BIN}" -client org.opends.server.tools.InstallDS -t 2> /dev/null
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes "${OPENDS_JAVA_BIN}" org.opends.server.tools.InstallDS -t 2> /dev/null
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes echo "ERROR: The detected Java version could not be used. Please set "
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes echo " OPENDS_JAVA_HOME to the root of a Java 5 (or later) installation."
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg "${OPENDS_JAVA_BIN}" ${JAVA_ARGS} org.opends.server.tools.InstallDS -t 2> /dev/null
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes echo "ERROR: The detected Java version could not be used. Please set "
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes echo " OPENDS_JAVA_HOME to the root of a Java 5 (or later) installation."
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# Launch the setup process.
0662ed52e814f8f08ef0e09956413a792584eddffuankg"${OPENDS_JAVA_BIN}" -Dorg.opends.server.scriptName=setup org.opends.quicksetup.installer.SetupLauncher "${@}"
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# return part
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes # Version info was on requested