mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
21.25.2007 792a76a5bc541be55e57597444e669adaf64e650
Fix for Issue 2782: New - Fail to launch upgrade CLI.

Committed after validation of Q&A (Unai).
3 files modified
19 ■■■■ changed files
opends/resource/bin/_script-util.bat 2 ●●● patch | view | raw | blame | history
opends/resource/upgrade 4 ●●●● patch | view | raw | blame | history
opends/resource/upgrade.bat 13 ●●●● patch | view | raw | blame | history
opends/resource/bin/_script-util.bat
@@ -118,7 +118,7 @@
:setEnvironmentVars
if %SET_ENVIRONMENT_VARS_DONE% == "true" goto end
set PATH=%SystemRoot%
set PATH=%SystemRoot%;%PATH%
set SCRIPT_NAME_ARG=-Dorg.opends.server.scriptName=%SCRIPT_NAME%
set SET_ENVIRONMENT_VARS_DONE=true
goto scriptBegin
opends/resource/upgrade
@@ -123,8 +123,8 @@
then
  # Copy jars to a temporary place from which to run the reverter
  # in order to avoid potential file lock issues.
  mkdir -p tmp/revert
  cp -R lib tmp/revert
  mkdir -p ${INSTANCE_ROOT}/tmp/revert
  cp -R ${INSTANCE_ROOT}/lib ${INSTANCE_ROOT}/tmp/revert
  if test ${?} -ne 0
  then
    echo "ERROR:  Failed to initialize reversion."
opends/resource/upgrade.bat
@@ -32,13 +32,6 @@
:checkNewVersion
if exist "upgrade.bat.NEW" goto newVersion
goto checkOpenDSJavaBin
:newVersion
echo A new version of this script was made available by the last upgrade
echo operation.  Delete this old version and rename file 'upgrade.bat.NEW'
echo to 'upgrade.bat' before continuing.
goto end
set SCRIPT_NAME=upgrade
@@ -59,6 +52,12 @@
if %errorlevel% == 0 goto end
goto error
:newVersion
echo A new version of this script was made available by the last upgrade
echo operation.  Delete this old version and rename file 'upgrade.bat.NEW'
echo to 'upgrade.bat' before continuing.
goto end
:upgrader
set CLASSPATH=""
FOR %%x in ("%INSTANCE_ROOT%\tmp\upgrade\lib\*.jar") DO call "%INSTANCE_ROOT%\lib\setcp.bat" %%x