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