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

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


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

commit 694bc81161bf2964846aaf2ce68a1b05208da1cb
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             | 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@VERSION_MAJOR@.exe and 
tomcat@version_ma...@w.exe to match
+rem --rename     (optional) Rename tomcat@VERSION_MAJOR@.exe and 
tomcat@version_ma...@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 b70e9fe..ac43803 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -183,15 +183,15 @@
         directory to local administrators, Local System and Local Service.
         (markt)
       </fix>
-      <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>
       <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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to