[Pkg-ocaml-maint-commits] [SCM] approx upstream and debian packaging branch, master, updated. debian/4.5-1-15-g3bc9bd4

Eric Cooper ecc at cmu.edu
Thu Apr 28 18:36:35 UTC 2011


The following commit has been merged in the master branch:
commit bfbe6e8416b577d33a0be25359d8a2939f427eed
Author: Eric Cooper <ecc at 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



More information about the Pkg-ocaml-maint-commits mailing list