This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/7.0.x by this push:
new 853e1af Refactor fix for BZ 63285 so .exe rename is on request not by
default
853e1af is described below
commit 853e1afa1ead77b3b2aab332a5b71c484e4ab55d
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Aug 12 11:51:16 2019 +0100
Refactor fix for BZ 63285 so .exe rename is on request not by default
---
bin/service.bat | 12 ++++++------
webapps/docs/changelog.xml | 18 +++++++++---------
webapps/docs/windows-service-howto.xml | 8 ++++----
3 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/bin/service.bat b/bin/service.bat
index 6105b15..0aee372 100755
--- a/bin/service.bat
+++ b/bin/service.bat
@@ -17,7 +17,7 @@ rem limitations under the License.
rem ---------------------------------------------------------------------------
rem NT Service Install/Uninstall script
rem
-rem Usage: service.bat install/remove [service_name [--no-rename]] [--user
username]
+rem Usage: service.bat install/remove [service_name [--rename]] [--user
username]
rem
rem Options
rem install Install the service using default settings.
@@ -26,7 +26,7 @@ rem
rem service_name (optional) The name to use for the service. If not specified,
rem Tomcat@VERSION_MAJOR@ is used as the service name.
rem
-rem --no-rename (optional) Don't rename tomcat@[email protected] and
tomcat@[email protected] to match
+rem --rename (optional) Rename tomcat@[email protected] and
tomcat@[email protected] to match
rem the non-default service name.
rem
rem username (optional) The name of the OS user to use to install/remove
@@ -55,8 +55,8 @@ if "x%1x" == "x--userx" goto runAsUser
set SERVICE_NAME=%1
shift
if "x%1x" == "xx" goto checkEnv
-if "x%1x" == "x--no-renamex" (
- set NO_RENAME=%1
+if "x%1x" == "x--renamex" (
+ set RENAME=%1
shift
)
if "x%1x" == "xx" goto checkEnv
@@ -153,7 +153,7 @@ if /i %SERVICE_CMD% == uninstall goto doRemove
echo Unknown parameter "%SERVICE_CMD%"
:displayUsage
echo.
-echo Usage: service.bat install/remove [service_name [--no-rename]] [--user
username]
+echo Usage: service.bat install/remove [service_name [--rename]] [--user
username]
goto end
:doRemove
@@ -201,7 +201,7 @@ if "%JvmMs%" == "" set JvmMs=128
if "%JvmMx%" == "" set JvmMx=256
if exist "%CATALINA_HOME%\bin\%DEFAULT_SERVICE_NAME%.exe" (
- if "x%NO_RENAME%x" == "xx" (
+ if "x%RENAME%x" == "x--renamex" (
rename "%DEFAULT_SERVICE_NAME%.exe" "%SERVICE_NAME%.exe"
rename "%DEFAULT_SERVICE_NAME%w.exe" "%SERVICE_NAME%w.exe"
set "EXECUTABLE=%CATALINA_HOME%\bin\%SERVICE_NAME%.exe"
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 3e260f7..8c130da 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -101,15 +101,15 @@
</subsection>
<subsection name="Other">
<changelog>
- <fix>
- <bug>63285</bug>: Modify <code>service.bat</code> so that when
- installing a Windows service, by default, it changes the name of the
- executables used by the Windows service to match the service name. This
- makes the installation behaviour consistent with the Windows installer.
- The original executable names will be restored when the Windows service
- is removed. The renaming can be disabled by using the new
- <code>--no-rename</code> option after the service name. (markt)
- </fix>
+ <add>
+ <bug>63285</bug>: Add an option to <code>service.bat</code> so that
when
+ installing a Windows service, the name of the executables used by the
+ Windows service may be changed to match the service name. This makes
the
+ installation behaviour consistent with the Windows installer. The
+ original executable names will be restored when the Windows service is
+ removed. The renaming can be enabled by using the new
+ <code>--rename</code> option after the service name. (markt)
+ </add>
<update>
<bug>63634</bug>: Align setproxy target in build.xml with
8.5/9.0. (michaelo)
diff --git a/webapps/docs/windows-service-howto.xml
b/webapps/docs/windows-service-howto.xml
index 27ed780..692596c 100644
--- a/webapps/docs/windows-service-howto.xml
+++ b/webapps/docs/windows-service-howto.xml
@@ -368,12 +368,12 @@ service, as displayed in Windows services.</p>
C:\> service.bat install MyService</source>
<p>When installing the service with a non-default name,
-tomcat<version-major/>.exe and tomcat<version-major/>w.exe will be renamed to
-match the chosen service name. To prevent this, use the
<code>--no-rename</code>
+tomcat<version-major/>.exe and tomcat<version-major/>w.exe may be renamed to
+match the chosen service name. To do this, use the <code>--rename</code>
option.</p>
-<source>Install the service named 'MyService' without renaming
-C:\> service.bat install MyService --no-rename</source>
+<source>Install the service named 'MyService' with renaming
+C:\> service.bat install MyService --rename</source>
<p>
If using tomcat<version-major/>.exe, you need to use the <b>//IS//</b>
parameter.</p>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]