_client-script.sh revision 62713b44520556f3136c67f8716f905d9a90c463
0N/A#!/bin/sh
2362N/A#
0N/A# CDDL HEADER START
0N/A#
0N/A# The contents of this file are subject to the terms of the
0N/A# Common Development and Distribution License, Version 1.0 only
2362N/A# (the "License"). You may not use this file except in compliance
0N/A# with the License.
2362N/A#
0N/A# You can obtain a copy of the license at
0N/A# trunk/opends/resource/legal-notices/OpenDS.LICENSE
0N/A# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
0N/A# See the License for the specific language governing permissions
0N/A# and limitations under the License.
0N/A#
0N/A# When distributing Covered Code, include this CDDL HEADER in each
0N/A# file and include the License file at
0N/A# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
0N/A# add the following below this CDDL HEADER, with the fields enclosed
0N/A# by brackets "[]" replaced with your own identifying information:
2362N/A# Portions Copyright [yyyy] [name of copyright owner]
2362N/A#
2362N/A# CDDL HEADER END
0N/A#
0N/A#
0N/A# Copyright 2006-2010 Sun Microsystems, Inc.
0N/A
0N/A
0N/A# This script is used to invoke various client-side processes. It should not
0N/A# be invoked directly by end users.
0N/Aif test -z "${OPENDS_INVOKE_CLASS}"
0N/Athen
0N/A echo "ERROR: OPENDS_INVOKE_CLASS environment variable is not set."
0N/A exit 1
0N/Afi
0N/A
0N/A
0N/A# Capture the current working directory so that we can change to it later.
0N/A# Then capture the location of this script and the Directory Server install
0N/A# root so that we can use them to create appropriate paths.
0N/AWORKING_DIR=`pwd`
0N/A
0N/Acd "`dirname "${0}"`"
0N/ASCRIPT_DIR=`pwd`
0N/A
0N/Acd ..
0N/AINSTALL_ROOT=`pwd`
0N/Aexport INSTALL_ROOT
0N/A
0N/Acd "${WORKING_DIR}"
0N/A
0N/A
0N/A# Set environment variables
0N/ASCRIPT_UTIL_CMD=set-full-environment
0N/Aexport SCRIPT_UTIL_CMD
0N/Aif [ -z "$NO_CHECK" ]
0N/Athen
0N/A NO_CHECK=1
0N/A export NO_CHECK
fi
. "${INSTALL_ROOT}/lib/_script-util.sh"
RETURN_CODE=$?
if test ${RETURN_CODE} -ne 0
then
exit ${RETURN_CODE}
fi
# Launch the appropriate client utility.
"${OPENDS_JAVA_BIN}" ${OPENDS_JAVA_ARGS} ${SCRIPT_ARGS} ${SCRIPT_NAME_ARG} "${OPENDS_INVOKE_CLASS}" "${@}"