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

Ludovic Claude ludovicc-guest at alioth.debian.org
Thu Mar 11 23:54:57 UTC 2010


Author: ludovicc-guest
Date: 2010-03-11 23:54:57 +0000 (Thu, 11 Mar 2010)
New Revision: 11839

Modified:
   trunk/tomcat6/debian/changelog
   trunk/tomcat6/debian/tomcat6.postrm
Log:
debian/tomcat6.postrm: fix removal of Tomcat (Closes: #567548)

Modified: trunk/tomcat6/debian/changelog
===================================================================
--- trunk/tomcat6/debian/changelog	2010-03-11 22:59:52 UTC (rev 11838)
+++ trunk/tomcat6/debian/changelog	2010-03-11 23:54:57 UTC (rev 11839)
@@ -1,3 +1,9 @@
+tomcat6 (6.0.24-4) unstable; urgency=low
+
+  * debian/tomcat6.postrm: fix removal of Tomcat (Closes: #567548)
+
+ -- Ludovic Claude <ludovic.claude at laposte.net>  Thu, 11 Mar 2010 23:45:34 +0100
+
 tomcat6 (6.0.24-3) unstable; urgency=medium
 
   * Set the major, minor and build versions when calling Ant

Modified: trunk/tomcat6/debian/tomcat6.postrm
===================================================================
--- trunk/tomcat6/debian/tomcat6.postrm	2010-03-11 22:59:52 UTC (rev 11838)
+++ trunk/tomcat6/debian/tomcat6.postrm	2010-03-11 23:54:57 UTC (rev 11839)
@@ -20,17 +20,17 @@
                 /var/lib/tomcat6/webapps \
                 /var/lib/tomcat6 || true
         fi
-        if [ -z "`(find var/lib/tomcat6/common/classes -type f)`" ] ; then
+        if [ -d /var/lib/tomcat6/common ] && [ -z "`(find var/lib/tomcat6/common/classes -type f)`" ] ; then
             rmdir --ignore-fail-on-non-empty \
                 /var/lib/tomcat6/common/classes \
                 /var/lib/tomcat6/common || true
         fi
-        if [ -z "`(find var/lib/tomcat6/server/classes -type f)`" ] ; then
+        if [ -d /var/lib/tomcat6/server ] && [ -z "`(find var/lib/tomcat6/server/classes -type f)`" ] ; then
             rmdir --ignore-fail-on-non-empty \
                 /var/lib/tomcat6/server/classes \
                 /var/lib/tomcat6/server || true
         fi
-        if [ -z "`(find var/lib/tomcat6/shared/classes -type f)`" ] ; then
+        if [ -d /var/lib/tomcat6/shared ] && [ -z "`(find var/lib/tomcat6/shared/classes -type f)`" ] ; then
             rmdir --ignore-fail-on-non-empty \
                 /var/lib/tomcat6/shared/classes \
                 /var/lib/tomcat6/shared || true
@@ -41,14 +41,19 @@
     ;;
 
     purge)
-        # Remove user/group and log files (don't remove everything under
-        # /var/lib/tomcat6 because there might be user-installed webapps)
-        deluser tomcat6 || true
         rm -rf /var/log/tomcat6 /var/lib/tomcat6/temp
         if [ -d "/var/lib/tomcat6" ] ; then
             rmdir --ignore-fail-on-non-empty /var/lib/tomcat6 || true
         fi
-        rmdir --ignore-fail-on-non-empty /etc/tomcat6/policy.d /etc/tomcat6 || true
+        rmdir --ignore-fail-on-non-empty /etc/tomcat6/policy.d \
+          /etc/tomcat6/Catalina/localhost /etc/tomcat6/Catalina /etc/tomcat6 || true
+		# Put all files owned by group tomcat6 back into root group before deleting
+		# the tomcat6 user and group
+		chown -Rh root:root /etc/tomcat6/
+        # Remove user/group and log files (don't remove everything under
+        # /var/lib/tomcat6 because there might be user-installed webapps)
+        deluser tomcat6 || true
+        delgroup tomcat6 || true
     ;;
 
     upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)




More information about the pkg-java-commits mailing list