The following commit has been merged in the master branch:
commit bfbe6e8416b577d33a0be25359d8a2939f427eed
Author: Eric Cooper <e...@cmu.edu>
Date:   Thu Mar 10 11:33:32 2011 -0500

    Revert "simplify creation of /var/cache/approx in postinst"
    
    This reverts commit 5195b926dc48236d971c02bc3addc71a143cf5d3.
    
    The postinst script cannot rely on adduser to create the cache directory.
    
    When the approx package is purged, the cache directory is removed but
    not the approx user.  If the approx package is reinstalled,
    adduser will exit without creating the cache directory.

diff --git a/debian/approx.postinst b/debian/approx.postinst
index c4bd7b2..c87c234 100644
--- a/debian/approx.postinst
+++ b/debian/approx.postinst
@@ -9,7 +9,13 @@ case "$1" in
 esac
 
 # add the approx user
-adduser --quiet --system --group --home /var/cache/approx approx
+adduser --quiet --system --group --no-create-home --home /var/cache/approx 
approx
+
+# create the approx cache directory if necessary
+if [ ! -d /var/cache/approx ]; then
+    mkdir /var/cache/approx
+    chown approx:approx /var/cache/approx
+fi
 
 # first remove any "vanilla" entry from /etc/inetd.conf
 update-inetd --remove '^(\d|\w)+\s.*\bapprox\b'

-- 
approx upstream and debian packaging

_______________________________________________
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-ocaml-maint-commits

Reply via email to