diff options
Diffstat (limited to 'debian/libpam-runtime.postinst')
-rw-r--r-- | debian/libpam-runtime.postinst | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/debian/libpam-runtime.postinst b/debian/libpam-runtime.postinst index 5a734671..e684db9a 100644 --- a/debian/libpam-runtime.postinst +++ b/debian/libpam-runtime.postinst @@ -3,19 +3,29 @@ # If the user has removed the config file, respect this sign of dementia # -- only create on package install. -if [ -z "$2" ] || dpkg --compare-versions "$2" lt 0.76-17 +force= +if [ -z "$2" ] || dpkg --compare-versions "$2" lt 1.0.1-5 then + force=--force for configfile in common-auth common-account common-session \ common-password do - if [ ! -f /etc/pam.d/$configfile ] || \ - fgrep -q `md5sum /etc/pam.d/$configfile` \ + if [ -f /etc/pam.d/$configfile ] && \ + ! fgrep -q `md5sum /etc/pam.d/$configfile` \ /usr/share/pam/$configfile.md5sums 2>/dev/null then - cp /usr/share/pam/$configfile /etc/pam.d/ + force= fi done - rm -f /etc/pam.d/other.pre-upgrade 2>/dev/null || true +fi + +pam-auth-update --package $force + +if [ -n "$force" ]; then + rm -f /etc/pam.d/common-auth.pam-old \ + /etc/pam.d/common-account.pam-old \ + /etc/pam.d/common-password.pam-old \ + /etc/pam.d/common-session.pam-old fi #DEBHELPER# |