~ecryptfs/ecryptfs/trunk

« back to all changes in this revision

Viewing changes to debian/ecryptfs-utils.postinst

  • Committer: Dustin Kirkland
  • Date: 2009-02-13 15:57:24 UTC
  • Revision ID: kirkland@canonical.com-20090213155724-1q3qz2o0cbyimu9x
debian/ubuntu packaging

Initial checkin of the Debian/Ubuntu packaging

Signed-off-by: Dustin Kirkland <kirkland@canonical.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -e
 
2
 
 
3
auth=0c1295085dca124e6ba5a3cea7993c22
 
4
account=9f04221fe44762047894adeb96ffd069
 
5
session=2e9a42f2a3b6573891ff9e6bf0c31c9e
 
6
password=4cf59ec48caad2a06ea2e183d8bc007a
 
7
 
 
8
force=
 
9
if dpkg --compare-versions "$2" lt-nl 53-1ubuntu6; then
 
10
        # If we're upgrading from an older ecryptfs-utils,
 
11
        # and the pam configuration precisely matches that
 
12
        # which was written by auth-client-config, we can
 
13
        # safely force the pam-auth-update.
 
14
        force=--force
 
15
        for type in auth account session password
 
16
        do
 
17
            sum="$(md5sum /etc/pam.d/common-$type 2>/dev/null | awk '{ print $1 }')"
 
18
            [ "$sum" = "$(eval echo \$$type)" ] || force=
 
19
        done
 
20
fi
 
21
pam-auth-update --package $force
 
22
 
 
23
#DEBHELPER#
 
24
 
 
25
exit 0
 
26
#!/bin/sh
 
27
 
 
28
set -e
 
29
 
 
30
case "${1}" in
 
31
        configure)
 
32
                # Basically, if a user chooses to encrypt their entire home
 
33
                # directory, we're going to need someplace to put their
 
34
                # ~/.ecryptfs directory that's available prior to mounting their
 
35
                # home directory. Classic chicken/egg bootstrapping.
 
36
 
 
37
                if [ ! -d /var/lib/ecryptfs ]
 
38
                then
 
39
                        mkdir -p /var/lib/ecryptfs
 
40
                        chmod 1777 /var/lib/ecryptfs
 
41
                fi
 
42
                ;;
 
43
 
 
44
        abort-upgrade|abort-remove|abort-deconfigure)
 
45
 
 
46
                ;;
 
47
 
 
48
        *)
 
49
                echo "postinst called with unknown argument \`{$1}'" >&2
 
50
                exit 1
 
51
                ;;
 
52
esac
 
53
 
 
54
#DEBHELPER#
 
55
 
 
56
exit 0