[Python-modules-commits] r23375 - in packages/celery/branches/wheezy/debian (1 file)

fladi-guest at users.alioth.debian.org fladi-guest at users.alioth.debian.org
Wed Jan 23 20:07:58 UTC 2013


    Date: Wednesday, January 23, 2013 @ 20:07:55
  Author: fladi-guest
Revision: 23375

Don't rely on deluser being present during purge.

Modified:
  packages/celery/branches/wheezy/debian/python-celery.postrm

Modified: packages/celery/branches/wheezy/debian/python-celery.postrm
===================================================================
--- packages/celery/branches/wheezy/debian/python-celery.postrm	2013-01-23 19:10:08 UTC (rev 23374)
+++ packages/celery/branches/wheezy/debian/python-celery.postrm	2013-01-23 20:07:55 UTC (rev 23375)
@@ -4,8 +4,12 @@
 
 case "$1" in
     purge)
-        deluser --system --quiet celery || true
-        delgroup --system --quiet --only-if-empty celery || true
+        if [ -x "$(command -v deluser)" ]; then
+            deluser --quiet --system celery > /dev/null || true
+            deluser --group --system --quiet --only-if-empty celery || true
+        else
+            echo >&2 "not removing celery system account and group because deluser command was not found"
+        fi
 	;;
     remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
 	;;




More information about the Python-modules-commits mailing list