upgrade revision 8ee2559efd80ab966eef9cfcef0aeb98b9885fc2
0N/A#!/bin/sh
157N/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
157N/A# (the "License"). You may not use this file except in compliance
0N/A# with the License.
157N/A#
0N/A# You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
0N/A# or http://forgerock.org/license/CDDLv1.0.html.
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 legal-notices/CDDLv1_0.txt.
0N/A# If applicable, add the following below this CDDL HEADER, with the
0N/A# fields enclosed by brackets "[]" replaced with your own identifying
0N/A# information:
0N/A# Portions Copyright [yyyy] [name of copyright owner]
157N/A#
157N/A# CDDL HEADER END
157N/A#
0N/A#
0N/A# Copyright 2013-2015 ForgeRock AS
0N/A
0N/A
0N/A# This script may be used to perform a backup of a Directory Server backend.
0N/AOPENDJ_INVOKE_CLASS="org.opends.server.tools.upgrade.UpgradeCli"
0N/Aexport OPENDJ_INVOKE_CLASS
0N/A
0N/ASCRIPT_NAME="upgrade"
0N/Aexport SCRIPT_NAME
0N/A
0N/ASCRIPT_DIR=`dirname "${0}"`
0N/A
0N/AINSTALL_ROOT=${SCRIPT_DIR}
0N/Aexport INSTALL_ROOT
0N/A
0N/A# Set environment variables
0N/ASCRIPT_UTIL_CMD=set-environment-vars
0N/Aexport SCRIPT_UTIL_CMD
0N/A. "${INSTALL_ROOT}/lib/_script-util.sh"
0N/ARETURN_CODE=$?
0N/Aif test ${RETURN_CODE} -ne 0
0N/Athen
0N/A exit ${RETURN_CODE}
0N/Afi
DIR_CLASSES="${INSTANCE_ROOT}/classes"
# The upgrade is not compatible with patches. If the folder is not empty
# 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" "${@}"