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

pvarga
17.37.2016 c2219eade1904400e21f8b39e3fd9527229580a4
OPENDJ-1976 setup.bat doesn't work without 8.3 format

- Avoid using ~s (short file name) modifier in all bat files
- Quotes missing around reading instance.loc contents
- Missing "delims=" in for /f (_script-util.bat)
- Duplicate quotes on TEMP_LOG in start-ds and stop-ds
33 files modified
102 ■■■■ changed files
opendj-server-legacy/resource/bin/_client-script.bat 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/_mixed-script.bat 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/_script-util.bat 12 ●●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/_server-script.bat 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/backendstat.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/backup.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/base64.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/control-panel.bat 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/dsconfig.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/dsjavaproperties.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/dsreplication.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/encode-password.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/export-ldif.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/import-ldif.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/ldapcompare.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/ldapdelete.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/ldapmodify.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/ldappasswordmodify.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/ldapsearch.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/ldif-diff.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/ldifmodify.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/ldifsearch.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/list-backends.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/make-ldif.bat 6 ●●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/manage-account.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/manage-tasks.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/rebuild-index.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/restore.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/start-ds.bat 6 ●●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/status.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/stop-ds.bat 12 ●●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/verify-index.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/windows-service.bat 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/_client-script.bat
@@ -19,12 +19,12 @@
rem be invoked directly by end users.
setlocal
for %%i in (%~sf0) do set DIR_HOME=%%~dPsi..
set DIR_HOME=%~dp0..
set INSTALL_ROOT=%DIR_HOME%
set INSTANCE_DIR=
if exist "%INSTALL_ROOT%\instance.loc" (
  set /p INSTANCE_DIR=<%INSTALL_ROOT%\instance.loc
  set /p INSTANCE_DIR=<"%INSTALL_ROOT%\instance.loc"
) else (
set INSTANCE_DIR=.
)
opendj-server-legacy/resource/bin/_mixed-script.bat
@@ -19,12 +19,12 @@
rem be invoked directly by end users.
setlocal
for %%i in (%~sf0) do set DIR_HOME=%%~dPsi..
set DIR_HOME=%~dp0..
set INSTALL_ROOT=%DIR_HOME%
set INSTANCE_DIR=
if exist "%INSTALL_ROOT%\instance.loc" (
  set /p INSTANCE_DIR=<%INSTALL_ROOT%\instance.loc
  set /p INSTANCE_DIR=<"%INSTALL_ROOT%\instance.loc"
) else (
set INSTANCE_DIR=.
)
opendj-server-legacy/resource/bin/_script-util.bat
@@ -32,11 +32,11 @@
:setInstanceRoot
setlocal
for %%i in (%~sf0) do set DIR_HOME=%%~dPsi..
set DIR_HOME=%~dp0..
set INSTALL_ROOT=%DIR_HOME%
set INSTANCE_DIR=
if exist "%INSTALL_ROOT%\instance.loc" (
  set /p INSTANCE_DIR=<%INSTALL_ROOT%\instance.loc
  set /p INSTANCE_DIR=<"%INSTALL_ROOT%\instance.loc"
) else (
set INSTANCE_DIR=.
)
@@ -52,8 +52,8 @@
if "%SET_CLASSPATH_DONE%" == "true" goto end
rem get the absolute paths before building the classpath
rem it also helps comparing the two paths
FOR /F %%i IN ("%INSTALL_ROOT%")  DO set INSTALL_ROOT=%%~dpnxi
FOR /F %%i IN ("%INSTANCE_ROOT%") DO set INSTANCE_ROOT=%%~dpnxi
FOR /F "delims=" %%i IN ("%INSTALL_ROOT%")  DO set INSTALL_ROOT=%%~dpnxi
FOR /F "delims=" %%i IN ("%INSTANCE_ROOT%") DO set INSTANCE_ROOT=%%~dpnxi
call "%INSTALL_ROOT%\lib\setcp.bat" %INSTALL_ROOT%\lib\bootstrap-client.jar
set CLASSPATH=%INSTANCE_ROOT%\classes;%CLASSPATH%
if "%INSTALL_ROOT%" == "%INSTANCE_ROOT%" goto setClassPathDone
@@ -67,8 +67,8 @@
if "%SET_CLASSPATH_DONE%" == "true" goto end
rem get the absolute paths before building the classpath
rem it also helps comparing the two paths
FOR /F %%i IN ("%INSTALL_ROOT%")  DO set INSTALL_ROOT=%%~dpnxi
FOR /F %%i IN ("%INSTANCE_ROOT%") DO set INSTANCE_ROOT=%%~dpnxi
FOR /F "delims=" %%i IN ("%INSTALL_ROOT%")  DO set INSTALL_ROOT=%%~dpnxi
FOR /F "delims=" %%i IN ("%INSTANCE_ROOT%") DO set INSTANCE_ROOT=%%~dpnxi
call "%INSTALL_ROOT%\lib\setcp.bat" %INSTALL_ROOT%\lib\bootstrap.jar
set CLASSPATH=%INSTANCE_ROOT%\classes;%CLASSPATH%
if "%INSTALL_ROOT%" == "%INSTANCE_ROOT%" goto setClassPathWithOpenDJLoggerDone
opendj-server-legacy/resource/bin/_server-script.bat
@@ -19,12 +19,12 @@
rem be invoked directly by end users.
setlocal
for %%i in (%~sf0) do set DIR_HOME=%%~dPsi..
set DIR_HOME=%~dp0..
set INSTALL_ROOT=%DIR_HOME%
set INSTANCE_DIR=
if exist "%INSTALL_ROOT%\instance.loc" (
  set /p INSTANCE_DIR=<%INSTALL_ROOT%\instance.loc
  set /p INSTANCE_DIR=<"%INSTALL_ROOT%\instance.loc"
) else (
set INSTANCE_DIR=.
)
opendj-server-legacy/resource/bin/backendstat.bat
@@ -18,5 +18,5 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.backends.pluggable.BackendStat"
set SCRIPT_NAME=backendstat
for %%i in (%~sf0) do call "%%~dPsi\..\lib\_server-script.bat" %*
call "%~dp0\..\lib\_server-script.bat" %*
opendj-server-legacy/resource/bin/backup.bat
@@ -19,5 +19,5 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.tools.BackUpDB"
set SCRIPT_NAME=backup
for %%i in (%~sf0) do call "%%~dPsi\..\lib\_mixed-script.bat" %*
call "%~dp0\..\lib\_mixed-script.bat" %*
opendj-server-legacy/resource/bin/base64.bat
@@ -19,5 +19,5 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.util.Base64"
set SCRIPT_NAME=base64
for %%i in (%~sf0) do call "%%~dPsi\..\lib\_client-script.bat" %*
call "%~dp0\..\lib\_client-script.bat" %*
opendj-server-legacy/resource/bin/control-panel.bat
@@ -16,12 +16,12 @@
rem Portions Copyright 2011-2012 ForgeRock AS.
setlocal
for %%i in (%~sf0) do set DIR_HOME=%%~dPsi..
set DIR_HOME=%~dp0..
set INSTALL_ROOT=%DIR_HOME%
set INSTANCE_DIR=
if exist "%INSTALL_ROOT%\instance.loc" (
  set /p INSTANCE_DIR=<%INSTALL_ROOT%\instance.loc
  set /p INSTANCE_DIR=<"%INSTALL_ROOT%\instance.loc"
) else (
set INSTANCE_DIR=.
)
opendj-server-legacy/resource/bin/dsconfig.bat
@@ -19,5 +19,5 @@
set OPENDJ_INVOKE_CLASS="org.forgerock.opendj.config.dsconfig.DSConfig"
set SCRIPT_NAME=dsconfig
for %%i in (%~sf0) do call "%%~dPsi\..\lib\_client-script.bat" %*
call "%~dp0\..\lib\_client-script.bat" %*
opendj-server-legacy/resource/bin/dsjavaproperties.bat
@@ -19,4 +19,4 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.tools.JavaPropertiesTool"
set SCRIPT_NAME=dsjavaproperties
for %%i in (%~sf0) do call "%%~dPsi\..\lib\_client-script.bat" %*
call "%~dp0\..\lib\_client-script.bat" %*
opendj-server-legacy/resource/bin/dsreplication.bat
@@ -32,4 +32,4 @@
goto callScript
:callScript
for %%i in (%~sf0) do call "%%~dPsi\..\lib\_server-script.bat" %*
call "%~dp0\..\lib\_server-script.bat" %*
opendj-server-legacy/resource/bin/encode-password.bat
@@ -19,5 +19,5 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.tools.EncodePassword"
set SCRIPT_NAME=encode-password
for %%i in (%~sf0) do call "%%~dPsi\..\lib\_server-script.bat" %*
call "%~dp0\..\lib\_server-script.bat" %*
opendj-server-legacy/resource/bin/export-ldif.bat
@@ -19,5 +19,5 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.tools.ExportLDIF"
set SCRIPT_NAME=export-ldif
for %%i in (%~sf0) do call "%%~dPsi\..\lib\_mixed-script.bat" %*
call "%~dp0\..\lib\_mixed-script.bat" %*
opendj-server-legacy/resource/bin/import-ldif.bat
@@ -19,5 +19,5 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.tools.ImportLDIF"
set SCRIPT_NAME=import-ldif
for %%i in (%~sf0) do call "%%~dPsi\..\lib\_mixed-script.bat" %*
call "%~dp0\..\lib\_mixed-script.bat" %*
opendj-server-legacy/resource/bin/ldapcompare.bat
@@ -19,5 +19,5 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.tools.LDAPCompare"
set SCRIPT_NAME=ldapcompare
for %%i in (%~sf0) do call "%%~dPsi\..\lib\_client-script.bat" %*
call "%~dp0\..\lib\_client-script.bat" %*
opendj-server-legacy/resource/bin/ldapdelete.bat
@@ -19,5 +19,5 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.tools.LDAPDelete"
set SCRIPT_NAME=ldapdelete
for %%i in (%~sf0) do call "%%~dPsi\..\lib\_client-script.bat" %*
call "%~dp0\..\lib\_client-script.bat" %*
opendj-server-legacy/resource/bin/ldapmodify.bat
@@ -19,5 +19,5 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.tools.LDAPModify"
set SCRIPT_NAME=ldapmodify
for %%i in (%~sf0) do call "%%~dPsi\..\lib\_client-script.bat" %*
call "%~dp0\..\lib\_client-script.bat" %*
opendj-server-legacy/resource/bin/ldappasswordmodify.bat
@@ -19,5 +19,5 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.tools.LDAPPasswordModify"
set SCRIPT_NAME=ldappasswordmodify
for %%i in (%~sf0) do call "%%~dPsi\..\lib\_client-script.bat" %*
call "%~dp0\..\lib\_client-script.bat" %*
opendj-server-legacy/resource/bin/ldapsearch.bat
@@ -19,5 +19,5 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.tools.LDAPSearch"
set SCRIPT_NAME=ldapsearch
for %%i in (%~sf0) do call "%%~dPsi\..\lib\_client-script.bat" %*
call "%~dp0\..\lib\_client-script.bat" %*
opendj-server-legacy/resource/bin/ldif-diff.bat
@@ -19,6 +19,6 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.tools.LDIFDiff"
set SCRIPT_NAME=ldif-diff
for %%i in (%~sf0) do call "%%~dPsi\..\lib\_server-script.bat" %*
call "%~dp0\..\lib\_server-script.bat" %*
opendj-server-legacy/resource/bin/ldifmodify.bat
@@ -19,5 +19,5 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.tools.LDIFModify"
set SCRIPT_NAME=ldifmodify
for %%i in (%~sf0) do  call "%%~dPsi\..\lib\_server-script.bat" %*
call "%~dp0\..\lib\_server-script.bat" %*
opendj-server-legacy/resource/bin/ldifsearch.bat
@@ -19,5 +19,5 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.tools.LDIFSearch"
set SCRIPT_NAME=ldifsearch
for %%i in (%~sf0) do  call "%%~dPsi\..\lib\_server-script.bat" %*
call "%~dp0\..\lib\_server-script.bat" %*
opendj-server-legacy/resource/bin/list-backends.bat
@@ -19,6 +19,6 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.tools.ListBackends"
set SCRIPT_NAME=list-backends
for %%i in (%~sf0) do call "%%~dPsi\..\lib\_server-script.bat" %*
call "%~dp0\..\lib\_server-script.bat" %*
opendj-server-legacy/resource/bin/make-ldif.bat
@@ -17,17 +17,17 @@
setlocal
for %%i in (%~sf0) do set NON_ESCAPED=%%~dPsi..
set NON_ESCAPED=%~dp0..
FOR /F "tokens=1-2* delims=%%" %%1 IN ("%NON_ESCAPED%") DO (
if NOT "%%2" == "" goto invalidPath)
for %%i in (%~sf0) do set DIR_HOME=%%~dPsi..
set DIR_HOME=%~dp0..
set INSTALL_ROOT=%DIR_HOME%
set INSTANCE_DIR=
if exist "%INSTALL_ROOT%\instance.loc" (
  set /p INSTANCE_DIR=<%INSTALL_ROOT%\instance.loc
  set /p INSTANCE_DIR=<"%INSTALL_ROOT%\instance.loc"
) else (
set INSTANCE_DIR=.
)
opendj-server-legacy/resource/bin/manage-account.bat
@@ -19,6 +19,6 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.tools.ManageAccount"
set SCRIPT_NAME=manage-account
for %%i in (%~sf0) do call "%%~dPsi\..\lib\_client-script.bat" %*
call "%~dp0\..\lib\_client-script.bat" %*
opendj-server-legacy/resource/bin/manage-tasks.bat
@@ -19,5 +19,5 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.tools.ManageTasks"
set SCRIPT_NAME=manage-tasks
for %%i in (%~sf0) do call "%%~dPsi\..\lib\_client-script.bat" %*
call "%~dp0\..\lib\_client-script.bat" %*
opendj-server-legacy/resource/bin/rebuild-index.bat
@@ -19,6 +19,6 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.tools.RebuildIndex"
set SCRIPT_NAME=rebuild-index
for %%i in (%~sf0) do call "%%~dPsi\..\lib\_server-script.bat" %*
call "%~dp0\..\lib\_server-script.bat" %*
opendj-server-legacy/resource/bin/restore.bat
@@ -19,6 +19,6 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.tools.RestoreDB"
set SCRIPT_NAME=restore
for %%i in (%~sf0) do call "%%~dPsi\..\lib\_mixed-script.bat" %*
call "%~dp0\..\lib\_mixed-script.bat" %*
opendj-server-legacy/resource/bin/start-ds.bat
@@ -16,12 +16,12 @@
rem Portions Copyright 2011-2014 ForgeRock AS.
setlocal
for %%i in (%~sf0) do set DIR_HOME=%%~dPsi..
set DIR_HOME=%~dp0..
set INSTALL_ROOT=%DIR_HOME%
set INSTANCE_DIR=
if exist "%INSTALL_ROOT%\instance.loc" (
  set /p INSTANCE_DIR=<%INSTALL_ROOT%\instance.loc
  set /p INSTANCE_DIR=<"%INSTALL_ROOT%\instance.loc"
) else (
set INSTANCE_DIR=.
)
@@ -30,7 +30,7 @@
cd /d %INSTANCE_DIR%
set INSTANCE_ROOT=%CD%
cd /d %CUR_DIR%
set TEMP_LOG="%TEMP%\logs\"
set TEMP_LOG=%TEMP%\logs\
if NOT EXIST "%INSTANCE_ROOT%\logs\" (
  if NOT EXIST "%TEMP_LOG%" (
opendj-server-legacy/resource/bin/status.bat
@@ -19,4 +19,4 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.tools.status.StatusCli"
set SCRIPT_NAME=status
for %%i in (%~sf0) do call "%%~dPsi\..\lib\_client-script.bat" %*
call "%~dp0\..\lib\_client-script.bat" %*
opendj-server-legacy/resource/bin/stop-ds.bat
@@ -21,7 +21,7 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.tools.StopDS"
set SCRIPT_NAME=stop-ds
for %%i in (%~sf0) do set DIR_HOME=%%~dPsi..
set DIR_HOME=%~dp0..
rem We keep this values to reset the environment before calling start-ds.
set ORIGINAL_JAVA_ARGS=%OPENDJ_JAVA_ARGS%
@@ -32,16 +32,16 @@
set INSTANCE_DIR=
if exist "%INSTALL_ROOT%\instance.loc" (
  set /p INSTANCE_DIR=<%INSTALL_ROOT%\instance.loc
  set /p INSTANCE_DIR=<"%INSTALL_ROOT%\instance.loc"
) else (
set INSTANCE_DIR=.
)
set CUR_DIR=%CD%
cd /d%INSTALL_ROOT%
cd /d%INSTANCE_DIR%
cd /d %INSTALL_ROOT%
cd /d %INSTANCE_DIR%
set INSTANCE_ROOT=%CD%
cd /d%CUR_DIR%
set TEMP_LOG="%TEMP%\logs\"
cd /d %CUR_DIR%
set TEMP_LOG=%TEMP%\logs\
if NOT EXIST "%INSTANCE_ROOT%\logs\" (
  if NOT EXIST "%TEMP_LOG%" (
opendj-server-legacy/resource/bin/verify-index.bat
@@ -19,6 +19,6 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.tools.VerifyIndex"
set SCRIPT_NAME=verify-index
for %%i in (%~sf0) do call "%%~dPsi\..\lib\_server-script.bat" %*
call "%~dp0\..\lib\_server-script.bat" %*
opendj-server-legacy/resource/bin/windows-service.bat
@@ -19,5 +19,5 @@
set OPENDJ_INVOKE_CLASS="org.opends.server.tools.ConfigureWindowsService"
set SCRIPT_NAME=windows-service
for %%i in (%~sf0) do call "%%~dPsi\..\lib\_client-script.bat" %*
call "%~dp0\..\lib\_client-script.bat" %*