source: trunk/debathena/config/pam-config/debian/debathena-pam-config.postinst @ 24443

Revision 24443, 1.5 KB checked in by broder, 14 years ago (diff)
In pam-config: * Replace libpam-athena-locker with libpam-afs-session. (Trac: #316)
Line 
1#!/bin/sh
2set -e
3# If on configure
4#  - we didn't already have a pam-auth-update-aware debathena-pam-config, and
5#  - the /etc/pam.d/common-* files are unmodified from either
6#   - stock Hardy files, as after a do-release-upgrade, or
7#   - the stock Debathena Hardy files supplied by old debathena-pam-config
8# then we force pam-auth-update.
9
10#DEBHELPER#
11
12debathena_hardy_files="
1344cdd3fac614ee24f9aaccad459cb094  /etc/pam.d/common-account
146734f92af34672ea4554964da6a56fb9  /etc/pam.d/common-auth
15926da8a781f7e7023689d6f36fa61f28  /etc/pam.d/common-password
16133fe5e5131ed14ee5bb9ec7339fbe35  /etc/pam.d/common-session
17"
18hardy_files="
199f04221fe44762047894adeb96ffd069  /etc/pam.d/common-account
20088442eac95e5d27310cba44cb730ec0  /etc/pam.d/common-auth
218537a9c7dc11a585d537fe5226c3ea81  /etc/pam.d/common-password
224845c1632b3561a9debe8d59be1b238e  /etc/pam.d/common-session
23"
24
25if [ "$1" = "configure" ]; then
26    if hash pam-auth-update 2>/dev/null; then
27        force=
28        if dpkg --compare-versions "$2" lt 1.7~ \
29            && (echo "$debathena_hardy_files" | md5sum --status -c /dev/stdin \
30                || echo "$hardy_files" | md5sum --status -c /dev/stdin); then
31            force=--force
32        fi
33        pam-auth-update --package $force
34        # pam-auth-update is broken.  (?)  Sigh.
35        perl -i -lne 'print unless (/^(krb5 | krb524 | athena-locker
36            | debathena-home-type | athena-session-tmpdir-mktemp | afs-session)$/x)' \
37          /var/lib/pam/seen
38        pam-auth-update --package
39    fi
40fi
41
42exit 0
Note: See TracBrowser for help on using the repository browser.