Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Nov 2009 14:45:26 +0100 (CET)
From:      Ruben van Staveren <ruben@verweg.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        Ruben van Staveren <ruben@verweg.com>
Subject:   ports/140829: www/tomcat55 rc.d script is broken and will not stop tomcat process
Message-ID:  <200911241345.nAODjQMK011365@helium.verweg.com>
Resent-Message-ID: <200911241350.nAODo1VJ028368@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         140829
>Category:       ports
>Synopsis:       www/tomcat55 rc.d script is broken and will not stop tomcat process
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 24 13:50:00 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Ruben van Staveren
>Release:        FreeBSD 7.2-STABLE i386
>Organization:
>Environment:
System: FreeBSD helium.verweg.com 7.2-STABLE FreeBSD 7.2-STABLE #76: Sun Nov 15 19:57:49 CET 2009 root@helium.verweg.com:/usr/obj/usr/cvsup/7-stable/src/sys/HELIUM-SMP i386


	
>Description:
	Due to various jvms in FreeBSD /usr/local/bin/java is a symlink to the configured one. tomcat55's rc.d script does not take that into account for the stop action and thus will not terminate/restart tomcat55.
	The attached patch corrects this misbehaviour
	
>How-To-Repeat:
	/usr/local/etc/rc.d/tomcat55 stop will complain the process is not running, even if it is.
>Fix:

	

--- tomcat55.diff begins here ---
diff -nur www/tomcat55.orig/Makefile www/tomcat55/Makefile
--- www/tomcat55.orig/Makefile	2008-10-26 12:26:11.000000000 +0100
+++ www/tomcat55/Makefile	2009-11-24 14:13:22.000000000 +0100
@@ -7,6 +7,7 @@
 
 PORTNAME=	tomcat
 PORTVERSION=	5.5.27
+PORTREVISION=	1
 CATEGORIES=	www java
 MASTER_SITES=	${MASTER_SITE_APACHE}
 MASTER_SITE_SUBDIR=	tomcat/tomcat-5/v${PORTVERSION}/bin
diff -nur www/tomcat55.orig/files/tomcat55.sh.in www/tomcat55/files/tomcat55.sh.in
--- www/tomcat55.orig/files/tomcat55.sh.in	2007-10-01 00:04:02.000000000 +0200
+++ www/tomcat55/files/tomcat55.sh.in	2009-11-23 17:38:03.000000000 +0100
@@ -109,7 +109,7 @@
 if [ -f $pidfile ]; then
   read rc_pid junk < $pidfile
   if [ ! -z "$rc_pid" ]; then
-    procname=`ps -o ucomm= -p $rc_pid`
+    procname=`ps -o command= -p $rc_pid | cut -f 1 -d ' '`
   fi
 fi
 if [ -z "$procname" ]; then
--- tomcat55.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911241345.nAODjQMK011365>