upgrade revision 8ee2559efd80ab966eef9cfcef0aeb98b9885fc2
210N/A#!/bin/sh
210N/A#
493N/A# CDDL HEADER START
210N/A#
210N/A# The contents of this file are subject to the terms of the
210N/A# Common Development and Distribution License, Version 1.0 only
210N/A# (the "License"). You may not use this file except in compliance
210N/A# with the License.
210N/A#
210N/A# You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
210N/A# or http://forgerock.org/license/CDDLv1.0.html.
210N/A# See the License for the specific language governing permissions
210N/A# and limitations under the License.
210N/A#
210N/A# When distributing Covered Code, include this CDDL HEADER in each
210N/A# file and include the License file at legal-notices/CDDLv1_0.txt.
210N/A# If applicable, add the following below this CDDL HEADER, with the
210N/A# fields enclosed by brackets "[]" replaced with your own identifying
210N/A# information:
210N/A# Portions Copyright [yyyy] [name of copyright owner]
210N/A#
210N/A# CDDL HEADER END
210N/A#
210N/A#
210N/A# Copyright 2013-2015 ForgeRock AS
210N/A
210N/A
210N/A# This script may be used to perform a backup of a Directory Server backend.
210N/AOPENDJ_INVOKE_CLASS="org.opends.server.tools.upgrade.UpgradeCli"
210N/Aexport OPENDJ_INVOKE_CLASS
210N/A
210N/ASCRIPT_NAME="upgrade"
210N/Aexport SCRIPT_NAME
210N/A
210N/ASCRIPT_DIR=`dirname "${0}"`
493N/A
210N/AINSTALL_ROOT=${SCRIPT_DIR}
210N/Aexport INSTALL_ROOT
210N/A
210N/A# Set environment variables
493N/ASCRIPT_UTIL_CMD=set-environment-vars
493N/Aexport SCRIPT_UTIL_CMD
210N/A. "${INSTALL_ROOT}/lib/_script-util.sh"
493N/ARETURN_CODE=$?
493N/Aif test ${RETURN_CODE} -ne 0
493N/Athen
210N/A exit ${RETURN_CODE}
210N/Afi
210N/A
210N/ADIR_CLASSES="${INSTANCE_ROOT}/classes"
210N/A# The upgrade is not compatible with patches. If the folder is not empty
493N/A# we renamed it as "classes.disabled", and the upgrade process should be launched properly.
if [ "`(ls -A ${DIR_CLASSES})`" ]; then
mv -f ${DIR_CLASSES} "${INSTANCE_ROOT}/classes.disabled"
mkdir ${DIR_CLASSES}
fi
"${SCRIPT_DIR}/lib/_server-script.sh" "${@}"