Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Aug 2006 09:55:55 +0200
From:      Radim Kolar <hsn@netmag.cz>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        liukang@cn.freebsd.org, hsn@localhost.iol.cz
Subject:   ports/102339: [PATCH] tomcat55: stop in rc.d script broken
Message-ID:  <E1GF4dX-000F7B-81@sanatana.dharma>
Resent-Message-ID: <200608210800.k7L80a9b092272@freefall.freebsd.org>

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

>Number:         102339
>Category:       ports
>Synopsis:       [PATCH] tomcat55: stop in rc.d script broken
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 21 08:00:35 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Radim Kolar
>Release:        FreeBSD 6.1-STABLE i386
>Organization:
>Environment:
System: FreeBSD sanatana.dharma 6.1-STABLE FreeBSD 6.1-STABLE #2: Tue Jun 27 10:46:03 CEST 2006 root@sanatana.dharma:/usr/obj/usr/src/sys/UP i386

versions:
diablo-jdk-1.5.0.06.00 Java Development Kit 1.5.0_06.00
pkg tomcat55 5.5.17 2006-07-03
	
>Description:
rc.d script provided with tomcat is broken at least on 6.X branch (i have no
5 or 4 machines for test) because commands status and stop can't find running
tomcat55 process. pid in tomcat55.pid file is correct but this script checks
also for name of command, but this name is not set right, full path is needed.


	
>How-To-Repeat:
/usr/local/etc/rc.d/tomcat55 start
/usr/local/etc/rc.d/tomcat55 status
(shows no tomcat55 is running)
/usr/local/etc/rc.d/tomcat55 stop
(same error here)
>Fix:
sanatana# diff -Naur tomcat55.orig tomcat55
--- tomcat55.orig       Mon Aug 21 09:01:35 2006
+++ tomcat55    Mon Aug 21 09:41:20 2006
@@ -109,7 +109,7 @@
 if [ -f $pidfile ]; then
   read rc_pid junk < $pidfile
   if [ ! -z "$rc_pid" ]; then
-    procname=`ps -o comm= $rc_pid`
+    procname=`ps -o command= $rc_pid | cut -f 1 -d " "`
   fi
 fi
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1GF4dX-000F7B-81>