summaryrefslogtreecommitdiff
path: root/debian/libpam-runtime.postinst
blob: fcfb88d54e6d7f20ca8107657f142f8d9888cdd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh -e

# If the user has removed the config file, respect this sign of dementia
# -- only create on package install.

force=
if [ -z "$2" ] || dpkg --compare-versions "$2" lt 1.0.1-3
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` \
		    /usr/share/pam/$configfile.md5sums 2>/dev/null
		then
			force=
		fi
	done
fi

pam-auth-update $force

#DEBHELPER#