[pkg-java] r11932 - trunk/tomcat6/debian

Niels Thykier nthykier-guest at alioth.debian.org
Thu Mar 25 22:42:54 UTC 2010


Author: nthykier-guest
Date: 2010-03-25 22:42:53 +0000 (Thu, 25 Mar 2010)
New Revision: 11932

Modified:
   trunk/tomcat6/debian/changelog
   trunk/tomcat6/debian/tomcat6.init
Log:
Applied patch from Arto Jantunen fixing an issue with cleaning up the pid-file.

Modified: trunk/tomcat6/debian/changelog
===================================================================
--- trunk/tomcat6/debian/changelog	2010-03-25 22:41:58 UTC (rev 11931)
+++ trunk/tomcat6/debian/changelog	2010-03-25 22:42:53 UTC (rev 11932)
@@ -4,6 +4,8 @@
     Thanks to Aaron J. Zirbes and Thierry Carrez for research and the patch.
     (Closes: LP: #541520)
   * Updated the changelog to mention closed CVE's in the 6.0.24-1 release.
+  * Applied patch from Arto Jantunen fixing an issue with cleaning up the
+    pid-file. (Closes: #574084)
 
  -- Niels Thykier <niels at thykier.net>  Thu, 25 Mar 2010 21:34:56 +0100
 

Modified: trunk/tomcat6/debian/tomcat6.init
===================================================================
--- trunk/tomcat6/debian/tomcat6.init	2010-03-25 22:41:58 UTC (rev 11931)
+++ trunk/tomcat6/debian/tomcat6.init	2010-03-25 22:42:53 UTC (rev 11932)
@@ -212,24 +212,22 @@
 	log_daemon_msg "Stopping $DESC" "$NAME"
 
 	set +e
-	start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
-		--user "$TOMCAT6_USER" --exec "$JAVA_HOME/bin/java" \
-		>/dev/null
-	if [ "$?" = "0" ]; then
-		log_progress_msg "(not running)"
-	else
+	if [ -f "$CATALINA_PID" ]; then 
 		start-stop-daemon --stop --pidfile "$CATALINA_PID" \
 			--user "$TOMCAT6_USER" \
 			--retry=TERM/20/KILL/5 >/dev/null
-		if [ $? -eq 3 ]; then
+		if [ $? -eq 1 ]; then
+			log_progress_msg "$DESC is not running but pid file exists, cleaning up"
+		elif [ $? -eq 3 ]; then
 			PID="`cat $CATALINA_PID`"
 			log_failure_msg "Failed to stop $NAME (pid $PID)"
 			exit 1
-		else
-			rm -f "$CATALINA_PID"
 		fi
+		rm -f "$CATALINA_PID"
+		rm -rf "$JVM_TMP"
+	else
+		log_progress_msg "(not running)"
 	fi
-	rm -rf "$JVM_TMP"
 	log_end_msg 0
 	set -e
 	;;
@@ -253,9 +251,7 @@
 	set -e
         ;;
   restart|force-reload)
-        if start-stop-daemon --test --stop --pidfile "$CATALINA_PID" \
-		--user $TOMCAT6_USER --exec "$JAVA_HOME/bin/java" \
-		>/dev/null; then
+	if [ -f "$CATALINA_PID" ]; then
 		$0 stop
 		sleep 1
 	fi




More information about the pkg-java-commits mailing list