[arch-commits] Commit in tomcat/trunk (PKGBUILD tomcat.install)

Ionut Biru ibiru at archlinux.org
Fri Aug 6 11:46:45 EDT 2010


    Date: Friday, August 6, 2010 @ 11:46:45
  Author: ibiru
Revision: 86882

upgpkg: tomcat 5.5.30-2 fix removing user

Modified:
  tomcat/trunk/PKGBUILD
  tomcat/trunk/tomcat.install

----------------+
 PKGBUILD       |    4 ++--
 tomcat.install |   10 +++++++---
 2 files changed, 9 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-08-06 10:57:45 UTC (rev 86881)
+++ PKGBUILD	2010-08-06 15:46:45 UTC (rev 86882)
@@ -3,7 +3,7 @@
 # Contributor: Guillaume ALAUX <guillaume at alaux dot net>
 pkgname=tomcat
 pkgver=5.5.30
-pkgrel=1
+pkgrel=2
 arch=('i686' 'x86_64')
 pkgdesc="Servlet container for Java Servlet and JavaServer Pages"
 url="http://tomcat.apache.org/"
@@ -27,7 +27,7 @@
   cd commons-daemon-1.0.2-native-src/unix
   sh configure --with-java=/usr/lib/jvm/java-6-openjdk
   make clean
-  make || return 1
+  make
   cp jsvc ../..
 
   # get rid of some cruft

Modified: tomcat.install
===================================================================
--- tomcat.install	2010-08-06 10:57:45 UTC (rev 86881)
+++ tomcat.install	2010-08-06 15:46:45 UTC (rev 86882)
@@ -1,7 +1,7 @@
 post_install() {
   getent group tomcat >/dev/null 2>&1 || groupadd -g 66 tomcat
   getent passwd tomcat >/dev/null 2>&1 || useradd -u 66 -g tomcat -d /opt/tomcat -s /bin/false tomcat
-  
+
   if [ -f lib/modules/`uname -r`/kernel/security/capability.ko ]; then
     echo ">>> It appears that your current kernel has linux security"
     echo ">>> capabilities built as a module. Tomcat requires this"
@@ -18,6 +18,10 @@
 }
 
 pre_remove() {
-  getent passwd tomcat >/dev/null 2>&1 || userdel tomcat &> /dev/null
-  getent group tomcat >/dev/null 2>&1 || groupdel tomcat &> /dev/null
+  if getent passwd tomcat >/dev/null 2>&1; then
+      userdel tomcat
+  fi
+  if getent group tomcat >/dev/null 2>&1; then
+      groupdel tomcat
+  fi
 }



More information about the arch-commits mailing list