_client-script.sh revision 3885
0N/A#!/bin/sh
0N/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
0N/A# (the "License"). You may not use this file except in compliance
0N/A# with the License.
0N/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:
0N/A# Portions Copyright [yyyy] [name of copyright owner]
0N/A#
0N/A# CDDL HEADER END
0N/A#
0N/A#
0N/A# Copyright 2006-2008 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
# Capture the current working directory so that we can change to it later.
# Then capture the location of this script and the Directory Server install
# root so that we can use them to create appropriate paths.
WORKING_DIR=`pwd`
cd "`dirname "${0}"`"
SCRIPT_DIR=`pwd`
cd ..
INSTALL_ROOT=`pwd`
export INSTALL_ROOT
cd "${WORKING_DIR}"
# Set environment variables
SCRIPT_UTIL_CMD=set-full-environment
export SCRIPT_UTIL_CMD
if [ -z "$NO_CHECK" ]
then
NO_CHECK=1
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_NAME_ARG} "${OPENDS_INVOKE_CLASS}" "${@}"