diff options
Diffstat (limited to 'debian/libpam-runtime.postinst')
-rw-r--r-- | debian/libpam-runtime.postinst | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/debian/libpam-runtime.postinst b/debian/libpam-runtime.postinst index 518e8d24..667b33a6 100644 --- a/debian/libpam-runtime.postinst +++ b/debian/libpam-runtime.postinst @@ -8,7 +8,7 @@ calculate_md5sum() sed -n -e'1,/# here are the per-package modules (the "Primary" block)/p; /# here.s the fallback if no module succeeds/,/# and here are more per-package modules (the "Additional" block)/p; /# end of pam-auth-update config/,$p' \ - /etc/pam.d/"$configfile" | md5sum | awk '{ print $1 }' + "$DPKG_ROOT"/etc/pam.d/"$configfile" | md5sum | awk '{ print $1 }' } # If the user has removed the config file, respect this sign of dementia @@ -20,26 +20,22 @@ then for configfile in common-auth common-account common-session \ common-password do - if [ -f /etc/pam.d/$configfile ] && \ + if [ -f "$DPKG_ROOT"/etc/pam.d/$configfile ] && \ ! fgrep -q $(calculate_md5sum $configfile) \ - /usr/share/pam/$configfile.md5sums 2>/dev/null + "$DPKG_ROOT"/usr/share/pam/$configfile.md5sums 2>/dev/null then force= fi done fi -pam-auth-update --package $force +pam-auth-update --root "$DPKG_ROOT" --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 -elif dpkg --compare-versions "$2" lt-nl 1.1.0-1 \ - && [ ! -e /etc/pam.d/common-session-noninteractive ] -then - cp -a /etc/pam.d/common-session /etc/pam.d/common-session-noninteractive + rm -f "$DPKG_ROOT"/etc/pam.d/common-auth.pam-old \ + "$DPKG_ROOT"/etc/pam.d/common-account.pam-old \ + "$DPKG_ROOT"/etc/pam.d/common-password.pam-old \ + "$DPKG_ROOT"/etc/pam.d/common-session.pam-old fi #DEBHELPER# |