You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/08/12 10:51:44 UTC

[tomcat] branch master updated: Refactor fix for BZ 63285 so .exe rename is on request not by default

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
     new 2933e68  Refactor fix for BZ 63285 so .exe rename is on request not by default
2933e68 is described below

commit 2933e6860023f02214d49fd8234b2ff0e54f2b6d
Author: Mark Thomas <ma...@apache.org>
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             | 14 +++++++-------
 webapps/docs/windows-service-howto.xml |  8 ++++----
 3 files changed, 17 insertions(+), 17 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@VERSION_MAJOR@.exe and tomcat@VERSION_MAJOR@w.exe to match
+rem --rename     (optional) Rename tomcat@VERSION_MAJOR@.exe and tomcat@VERSION_MAJOR@w.exe 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 b65efa2..214ec60 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -213,15 +213,15 @@
         Expand the coverage and quality of the French translations provided
         with Apache Tomcat. (remm)
       </add>
-      <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
+      <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 disabled by using the new
-        <code>--no-rename</code> option after the service name. (markt)
-      </fix>
+        is removed. The renaming can be enabled by using the new
+        <code>--rename</code> option after the service name. (markt)
+      </add>
       <fix>
         <bug>63567</bug>: Restore the passing of <code>$LOGGING_MANAGER</code>
         to the jvm in <code>catalina.sh</code> when calling <code>stop</code>.
diff --git a/webapps/docs/windows-service-howto.xml b/webapps/docs/windows-service-howto.xml
index b9215f7..c03ef92 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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org