start-ds revision 3972
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# CDDL HEADER START
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# The contents of this file are subject to the terms of the
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# Common Development and Distribution License, Version 1.0 only
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# (the "License"). You may not use this file except in compliance
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# with the License.
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# You can obtain a copy of the license at
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# trunk/opends/resource/legal-notices/OpenDS.LICENSE
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# See the License for the specific language governing permissions
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# and limitations under the License.
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# When distributing Covered Code, include this CDDL HEADER in each
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# file and include the License file at
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# add the following below this CDDL HEADER, with the fields enclosed
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# by brackets "[]" replaced with your own identifying information:
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# Portions Copyright [yyyy] [name of copyright owner]
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# CDDL HEADER END
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# Copyright 2006-2008 Sun Microsystems, Inc.
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# Capture the current working directory so that we can change to it later.
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# Then capture the location of this script and the Directory Server instance
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# root so that we can use them to create appropriate paths.
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bosecd "${WORKING_DIR}"
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# Specify the script name so that it may be provided in command-line usage.
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# check for presence of lib/_svc-opends.sh file
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# If present, we should be on Solaris/OpenSolaris and use SMF to start
b6cd138f1e444d73295d3d3869de2dc4194f1742Lukas Slebodnik# Check --exec. If not present, start OpenDS from SMF
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Boseif test -f "${INSTALL_ROOT}/lib/_svc-opends.sh"
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose elif [ -z "$1" -o "$1" == "-L" -o "$1" == "-Q" -o "$1" == "-N" -o \
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose "$1" == "--nodetach" -o "$1" == "-useLastKnownGoodConfig" \
1d1a0a019d8d4d9ab0f51ada03604cd2cada287eSumit Bose# these options are only used when trying to start the server
export SCRIPT_UTIL_CMD
export CHECK_VERSION
. "${INSTALL_ROOT}/lib/_script-util.sh"
RETURN_CODE=$?
exit ${RETURN_CODE}
EC=${?}
EC=${?}
EC=${?}
exit ${EC}