From eb0139c8edc492a2ee316fd0624ba1069390bf42 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Wed, 01 Jul 2009 11:35:07 +0000
Subject: [PATCH] Follow up to the fix for issue 4081 (start-ds and stop-ds fails on Mac OS X with latest JVM).
---
opends/resource/bin/stop-ds | 4 ++--
opends/resource/bin/stop-ds.bat | 10 +++++-----
opends/resource/bin/start-ds | 8 ++++----
opends/resource/bin/start-ds.bat | 14 +++++++-------
4 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/opends/resource/bin/start-ds b/opends/resource/bin/start-ds
index 5358b76..ee6b0e4 100755
--- a/opends/resource/bin/start-ds
+++ b/opends/resource/bin/start-ds
@@ -91,7 +91,7 @@
# means that the server is already running and we shouldn't try to start it.
# An exit code of anything else means that we're not trying to start the server
# and we can just exit with that exit code.
-${OPENDS_JAVA_BIN} ${SCRIPT_NAME_ARG} org.opends.server.core.DirectoryServer \
+${OPENDS_JAVA_BIN} -client ${SCRIPT_NAME_ARG} org.opends.server.core.DirectoryServer \
--configClass org.opends.server.extensions.ConfigFileHandler \
--configFile "${CONFIG_FILE}" --checkStartability "${@}"
EC=${?}
@@ -108,17 +108,17 @@
echo $! > "${PID_FILE}"
if test ${EC} -eq 99
then
- "${OPENDS_JAVA_BIN}" org.opends.server.tools.WaitForFileDelete \
+ "${OPENDS_JAVA_BIN}" -client org.opends.server.tools.WaitForFileDelete \
--targetFile "${STARTING_FILE}" --logFile "${LOG_FILE}" "${@}"
else
- "${OPENDS_JAVA_BIN}" org.opends.server.tools.WaitForFileDelete \
+ "${OPENDS_JAVA_BIN}" -client org.opends.server.tools.WaitForFileDelete \
--targetFile "${STARTING_FILE}" "${@}"
fi
EC=${?}
if test ${EC} -eq 0
then
# An exit code of 98 means that the server is already running.
- ${OPENDS_JAVA_BIN} ${SCRIPT_NAME_ARG} org.opends.server.core.DirectoryServer \
+ ${OPENDS_JAVA_BIN} -client ${SCRIPT_NAME_ARG} org.opends.server.core.DirectoryServer \
--configClass org.opends.server.extensions.ConfigFileHandler \
--configFile "${CONFIG_FILE}" --checkStartability > /dev/null 2>&1
EC=${?}
diff --git a/opends/resource/bin/start-ds.bat b/opends/resource/bin/start-ds.bat
index 5206257..7cb457e 100644
--- a/opends/resource/bin/start-ds.bat
+++ b/opends/resource/bin/start-ds.bat
@@ -59,7 +59,7 @@
echo %SCRIPT%: PATH=%PATH% >> %LOG%
-"%OPENDS_JAVA_BIN%" %SCRIPT_NAME_ARG% org.opends.server.core.DirectoryServer --configClass org.opends.server.extensions.ConfigFileHandler --configFile "%INSTANCE_ROOT%\config\config.ldif" --checkStartability %*
+"%OPENDS_JAVA_BIN%" -client %SCRIPT_NAME_ARG% org.opends.server.core.DirectoryServer --configClass org.opends.server.extensions.ConfigFileHandler --configFile "%INSTANCE_ROOT%\config\config.ldif" --checkStartability %*
if %errorlevel% == 98 goto serverAlreadyStarted
if %errorlevel% == 99 goto runDetach
@@ -101,7 +101,7 @@
if exist "%INSTANCE_ROOT%\lib\set-java-args.bat" DO call "%INSTANCE_ROOT%\lib\set-java-args.bat"
"%INSTALL_ROOT%\lib\winlauncher.exe" start "%INSTANCE_ROOT%" "%OPENDS_JAVA_BIN%" %OPENDS_JAVA_ARGS% %SCRIPT_NAME_ARG% org.opends.server.core.DirectoryServer --configClass org.opends.server.extensions.ConfigFileHandler --configFile "%INSTANCE_ROOT%\config\config.ldif" %*
echo %SCRIPT%: Waiting for "%INSTANCE_ROOT%\logs\server.starting" to be deleted >> %LOG%
-"%OPENDS_JAVA_BIN%" org.opends.server.tools.WaitForFileDelete --targetFile "%INSTANCE_ROOT%\logs\server.starting" --logFile "%INSTANCE_ROOT%\logs\server.out" %*
+"%OPENDS_JAVA_BIN%" -client org.opends.server.tools.WaitForFileDelete --targetFile "%INSTANCE_ROOT%\logs\server.starting" --logFile "%INSTANCE_ROOT%\logs\server.out" %*
goto checkStarted
:runDetachQuiet
@@ -111,7 +111,7 @@
if exist "%INSTANCE_ROOT%\lib\set-java-args.bat" DO call "%INSTANCE_ROOT%\lib\set-java-args.bat"
"%INSTALL_ROOT%\lib\winlauncher.exe" start "%INSTANCE_ROOT%" "%OPENDS_JAVA_BIN%" %OPENDS_JAVA_ARGS% %SCRIPT_NAME_ARG% org.opends.server.core.DirectoryServer --configClass org.opends.server.extensions.ConfigFileHandler --configFile "%INSTANCE_ROOT%\config\config.ldif" %*
echo %SCRIPT%: Waiting for "%INSTANCE_ROOT%\logs\server.starting" to be deleted >> %LOG%
-"%OPENDS_JAVA_BIN%" org.opends.server.tools.WaitForFileDelete --targetFile "%INSTANCE_ROOT%\logs\server.starting" --logFile "%INSTANCE_ROOT%\logs\server.out" %* >> %LOG%
+"%OPENDS_JAVA_BIN%" -client org.opends.server.tools.WaitForFileDelete --targetFile "%INSTANCE_ROOT%\logs\server.starting" --logFile "%INSTANCE_ROOT%\logs\server.out" %* >> %LOG%
goto checkStarted
:runDetachCalledByWinService
@@ -124,22 +124,22 @@
if exist "%INSTANCE_ROOT%\lib\set-java-args.bat" DO call "%INSTANCE_ROOT%\lib\set-java-args.bat"
"%INSTALL_ROOT%\lib\winlauncher.exe" start "%INSTANCE_ROOT%" "%OPENDS_JAVA_BIN%" -Xrs %OPENDS_JAVA_ARGS% %SCRIPT_NAME_ARG% org.opends.server.core.DirectoryServer --configClass org.opends.server.extensions.ConfigFileHandler --configFile "%INSTANCE_ROOT%\config\config.ldif" %*
echo %SCRIPT%: Waiting for "%INSTANCE_ROOT%\logs\server.starting" to be deleted >> %LOG%
-"%OPENDS_JAVA_BIN%" org.opends.server.tools.WaitForFileDelete --targetFile "%INSTANCE_ROOT%\logs\server.starting" --logFile "%INSTANCE_ROOT%\logs\server.out" --outputFile "%INSTANCE_ROOT%\logs\winservice.out" %*
+"%OPENDS_JAVA_BIN%" -client org.opends.server.tools.WaitForFileDelete --targetFile "%INSTANCE_ROOT%\logs\server.starting" --logFile "%INSTANCE_ROOT%\logs\server.out" --outputFile "%INSTANCE_ROOT%\logs\winservice.out" %*
erase "%INSTANCE_ROOT%\logs\server.startingservice"
goto checkStarted
:runAsService
echo %SCRIPT%: Run as service >> %LOG%
-"%OPENDS_JAVA_BIN%" org.opends.server.tools.StartWindowsService
+"%OPENDS_JAVA_BIN%" -client org.opends.server.tools.StartWindowsService
echo %SCRIPT%: Waiting for "%INSTANCE_ROOT%\logs\server.startingservice" to be deleted >> %LOG%
-"%OPENDS_JAVA_BIN%" org.opends.server.tools.WaitForFileDelete --targetFile "%INSTANCE_ROOT%\logs\server.startingservice" %*
+"%OPENDS_JAVA_BIN%" -client org.opends.server.tools.WaitForFileDelete --targetFile "%INSTANCE_ROOT%\logs\server.startingservice" %*
rem Type the contents the winwervice.out file and delete it.
if exist "%INSTANCE_ROOT%\logs\winservice.out" type "%INSTANCE_ROOT%\logs\winservice.out"
if exist "%INSTANCE_ROOT%\logs\winservice.out" erase "%INSTANCE_ROOT%\logs\winservice.out"
goto end
:checkStarted
-"%OPENDS_JAVA_BIN%" %SCRIPT_NAME_ARG% org.opends.server.core.DirectoryServer --configClass org.opends.server.extensions.ConfigFileHandler --configFile "%INSTANCE_ROOT%\config\config.ldif" --checkStartability > NUL 2>&1
+"%OPENDS_JAVA_BIN%" -client %SCRIPT_NAME_ARG% org.opends.server.core.DirectoryServer --configClass org.opends.server.extensions.ConfigFileHandler --configFile "%INSTANCE_ROOT%\config\config.ldif" --checkStartability > NUL 2>&1
if %errorlevel% == 98 goto serverStarted
goto serverNotStarted
diff --git a/opends/resource/bin/stop-ds b/opends/resource/bin/stop-ds
index 6f18347..f8b806b 100755
--- a/opends/resource/bin/stop-ds
+++ b/opends/resource/bin/stop-ds
@@ -164,7 +164,7 @@
EXIT_CODE=${?}
if test ${EXIT_CODE} -eq 0
then
- "${OPENDS_JAVA_BIN}" org.opends.server.tools.WaitForFileDelete \
+ "${OPENDS_JAVA_BIN}" -client org.opends.server.tools.WaitForFileDelete \
--targetFile "${INSTANCE_ROOT}/logs/server.pid" \
--logFile "${INSTANCE_ROOT}/logs/errors"
EXIT_CODE=${?}
@@ -225,5 +225,5 @@
fi
# If we've gotten here, then we should try to stop the server over LDAP.
-"${OPENDS_JAVA_BIN}" ${JAVA_ARGS} ${SCRIPT_NAME_ARG} \
+"${OPENDS_JAVA_BIN}" ${OPENDS_JAVA_ARGS} ${SCRIPT_NAME_ARG} \
org.opends.server.tools.StopDS "${@}"
diff --git a/opends/resource/bin/stop-ds.bat b/opends/resource/bin/stop-ds.bat
index 8cfe6a0..43cd8a2 100644
--- a/opends/resource/bin/stop-ds.bat
+++ b/opends/resource/bin/stop-ds.bat
@@ -64,7 +64,7 @@
echo %SCRIPT%: CLASSPATH=%CLASSPATH% >> %LOG%
-"%OPENDS_JAVA_BIN%" %SCRIPT_NAME_ARG% org.opends.server.tools.StopDS --checkStoppability %*
+"%OPENDS_JAVA_BIN%" %OPENDS_JAVA_ARGS% %SCRIPT_NAME_ARG% org.opends.server.tools.StopDS --checkStoppability %*
if %errorlevel% == 98 goto serverAlreadyStopped
if %errorlevel% == 99 goto startUsingSystemCall
@@ -110,16 +110,16 @@
:stopAsWindowsService
echo %SCRIPT%: stop as windows service >> %LOG%
-"%OPENDS_JAVA_BIN%" org.opends.server.tools.StopWindowsService
+"%OPENDS_JAVA_BIN%" -client org.opends.server.tools.StopWindowsService
goto end
:restartAsWindowsService
echo %SCRIPT%: restart as windows service, stopping >> %LOG%
-"%OPENDS_JAVA_BIN%" org.opends.server.tools.StopWindowsService
+"%OPENDS_JAVA_BIN%" -client org.opends.server.tools.StopWindowsService
if not %errorlevel% == 0 goto end
echo %SCRIPT%: restart as windows service, starting >> %LOG%
-"%OPENDS_JAVA_BIN%" org.opends.server.tools.StartWindowsService
-"%OPENDS_JAVA_BIN%" org.opends.server.tools.WaitForFileDelete --targetFile "%INSTANCE_ROOT%\logs\server.startingservice"
+"%OPENDS_JAVA_BIN%" -client org.opends.server.tools.StartWindowsService
+"%OPENDS_JAVA_BIN%" -client org.opends.server.tools.WaitForFileDelete --targetFile "%INSTANCE_ROOT%\logs\server.startingservice"
rem Type the contents the winwervice.out file and delete it.
if exist "%INSTANCE_ROOT%\logs\winservice.out" type "%INSTANCE_ROOT%\logs\winservice.out"
if exist "%INSTANCE_ROOT%\logs\winservice.out" erase "%INSTANCE_ROOT%\logs\winservice.out"
--
Gitblit v1.10.0