setup revision 1777
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd# CDDL HEADER START
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd# The contents of this file are subject to the terms of the
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive# Common Development and Distribution License, Version 1.0 only
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive# (the "License"). You may not use this file except in compliance
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive# with the License.
96ad5d81ee4a2cc66a4ae19893efc8aa6d06fae7jailletc# You can obtain a copy of the license at
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# See the License for the specific language governing permissions
2e545ce2450a9953665f701bb05350f0d3f26275nd# and limitations under the License.
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# When distributing Covered Code, include this CDDL HEADER in each
fe64b2ba25510d8c9dba5560a2d537763566cf40nd# file and include the License file at
fe64b2ba25510d8c9dba5560a2d537763566cf40nd# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
fe64b2ba25510d8c9dba5560a2d537763566cf40nd# add the following below this CDDL HEADER, with the fields enclosed
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen# by brackets "[]" replaced with your own identifying information:
3f08db06526d6901aa08c110b5bc7dde6bc39905nd# Portions Copyright [yyyy] [name of copyright owner]
fe64b2ba25510d8c9dba5560a2d537763566cf40nd# CDDL HEADER END
fe64b2ba25510d8c9dba5560a2d537763566cf40nd# Portions Copyright 2006-2007 Sun Microsystems, Inc.
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd# See if JAVA_HOME is set. If not, then see if there is a java executable in
3e6b8c7840a46cdccd46b7a4b1902c2bc82f6cc2gryzor# the path and try to figure it out.
7f5b59ccc63c0c0e3e678a168f09ee6a2f51f9d0ndif test -z "${JAVA_BIN}"
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd if test -z "${JAVA_HOME}"
f3f945b6f394da4d080082fae12da22b4989914and if test -f "${INSTANCE_ROOT}/lib/set-java-home"
fe64b2ba25510d8c9dba5560a2d537763566cf40nd . "${INSTANCE_ROOT}/bin/set-java-home"
1acae7fb634ac2b01682507175e072b168995e0dcolm echo "Please set JAVA_HOME to the root of a Java 5 (or later) installation."
4624ec7c743a08f22e90521b97d612c9499ae7efminfrin# Explicitly set the PATH, LD_LIBRARY_PATH, LD_PRELOAD, and other important
4624ec7c743a08f22e90521b97d612c9499ae7efminfrin# system environment variables for security and compatibility reasons.
4624ec7c743a08f22e90521b97d612c9499ae7efminfrinexport PATH LD_LIBRARY_PATH LD_LIBRARY_PATH_32 LD_LIBRARY_PATH_64 \
4624ec7c743a08f22e90521b97d612c9499ae7efminfrin# Capture the current working directory so that we can change to it later.
4624ec7c743a08f22e90521b97d612c9499ae7efminfrin# Then capture the location of this script and the Directory Server instance
4624ec7c743a08f22e90521b97d612c9499ae7efminfrin# root so that we can use them to create appropriate paths.
4624ec7c743a08f22e90521b97d612c9499ae7efminfrincd "${WORKING_DIR}"
4624ec7c743a08f22e90521b97d612c9499ae7efminfrin# Configure the appropriate CLASSPATH.
4624ec7c743a08f22e90521b97d612c9499ae7efminfrin# Determine whether the detected Java environment is acceptable for use.
4624ec7c743a08f22e90521b97d612c9499ae7efminfrinif test -z "${JAVA_ARGS}"
4624ec7c743a08f22e90521b97d612c9499ae7efminfrin "${JAVA_BIN}" -client org.opends.server.tools.InstallDS -t 2> /dev/null
4624ec7c743a08f22e90521b97d612c9499ae7efminfrin "${JAVA_BIN}" org.opends.server.tools.InstallDS -t 2> /dev/null
4624ec7c743a08f22e90521b97d612c9499ae7efminfrin echo "ERROR: The detected Java version could not be used. Please set "
4624ec7c743a08f22e90521b97d612c9499ae7efminfrin echo " JAVA_HOME to the root of a Java 5 (or later) installation."
06ba4a61654b3763ad65f52283832ebf058fdf1cslive "${JAVA_BIN}" ${JAVA_ARGS} org.opends.server.tools.InstallDS -t 2> /dev/null
4624ec7c743a08f22e90521b97d612c9499ae7efminfrin echo "ERROR: The detected Java version could not be used. Please set "
4624ec7c743a08f22e90521b97d612c9499ae7efminfrin echo " JAVA_HOME to the root of a Java 5 (or later) installation."
0734f81384d5f2528bb119f89d135043a280d5b2minfrin# Launch the setup process.
0734f81384d5f2528bb119f89d135043a280d5b2minfrin"${JAVA_BIN}" org.opends.quicksetup.installer.InstallLauncher -P setup "${@}"
0734f81384d5f2528bb119f89d135043a280d5b2minfrin# return part
2aff288113d772cedca6add888eb643afffe9fb1nd # Version info was on requested