_script-util.sh revision 2976
2976N/A# The contents of this file are subject to the terms of the 2976N/A# Common Development and Distribution License, Version 1.0 only 2976N/A# (the "License"). You may not use this file except in compliance 2976N/A# You can obtain a copy of the license at 2976N/A# See the License for the specific language governing permissions 2976N/A# and limitations under the License. 2976N/A# When distributing Covered Code, include this CDDL HEADER in each 2976N/A# file and include the License file at 2976N/A# add the following below this CDDL HEADER, with the fields enclosed 2976N/A# by brackets "[]" replaced with your own identifying information: 2976N/A# Portions Copyright [yyyy] [name of copyright owner] 2976N/A# Portions Copyright 2007 Sun Microsystems, Inc. 2976N/A# function that sets the java home 2976N/A elif test -z "${OPENDS_JAVA_BIN}" 2976N/A if test -z "${OPENDS_JAVA_HOME}" 2976N/A echo "Please set OPENDS_JAVA_HOME to the root of a Java 5 (or later) installation" 2976N/A echo "specify the java version to be used" 2976N/A# Determine whether the detected Java environment is acceptable for use. 2976N/A if test -z "${OPENDS_JAVA_ARGS}" 2976N/A echo "ERROR: The detected Java version could not be used. The detected" 2976N/A echo "You must specify the path to a valid Java 5.0 or higher version." 2976N/A echo "The procedure to follow is:" 2976N/A echo "2. Set the environment variable OPENDS_JAVA_HOME to the root of a valid " 2976N/A echo "Java 5.0 installation." 2976N/A echo "If you want to have specific java settings for each command line you must" 2976N/A echo "follow the steps 3 and 4." 2976N/A echo "3. Edit the properties file specifying the java binary and the java arguments" 2976N/A echo "for each command line. The java properties file is located in:" 2976N/A echo "ERROR: The detected Java version could not be used with the set of java" 2976N/A echo "arguments ${OPENDS_JAVA_ARGS}." 2976N/A echo "The detected java binary is:" 2976N/A echo "You must specify the path to a valid Java 5.0 or higher version." 2976N/A echo "The procedure to follow is:" 2976N/A echo "2. Set the environment variable OPENDS_JAVA_HOME to the root of a valid " 2976N/A echo "Java 5.0 installation." 2976N/A echo "If you want to have specific java settings for each command line you must" 2976N/A echo "follow the steps 3 and 4." 2976N/A echo "3. Edit the properties file specifying the java binary and the java arguments" 2976N/A echo "for each command line. The java properties file is located in:" 2976N/A# Explicitly set the PATH, LD_LIBRARY_PATH, LD_PRELOAD, and other important 2976N/A# system environment variables for security and compatibility reasons. 2976N/A# Configure the appropriate CLASSPATH. 2976N/Aif test "${INSTANCE_ROOT}" =
"" 2976N/A # Capture the current working directory so that we can change to it later. 2976N/A # Then capture the location of this script and the Directory Server instance 2976N/A # root so that we can use them to create appropriate paths. 2976N/Aif test "${SCRIPT_UTIL_CMD}" =
"set-full-environment-and-test-java" 2976N/Aelif test "${SCRIPT_UTIL_CMD}" =
"set-full-environment" 2976N/Aelif test "${SCRIPT_UTIL_CMD}" =
"set-java-home-and-args" 2976N/Aelif test "${SCRIPT_UTIL_CMD}" =
"set-environment-vars" 2976N/Aelif test "${SCRIPT_UTIL_CMD}" =
"set-classpath" 2976N/Aelif test "${SCRIPT_UTIL_CMD}" =
"test-java"