summaryrefslogtreecommitdiff
path: root/debian/libnss-mapuser.prerm
blob: af98f1bb4e5d4690edf1cd7537d5b7a504472ab6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

set -e

if [ "$1" = remove ]; then
	pam-auth-update --package --remove mapuser
    # Undo the addition of the plugins
    if [ -e "/etc/nsswitch.conf" ]; then
        sed -i -e '/^passwd:.*mapuid[ \t]/s/mapuid[ \t]//' \
            -e '/^passwd:.*[ \t]mapname/s/[ \t]mapname//' \
            /etc/nsswitch.conf || true # don't prevent remove on error
    fi
fi

#DEBHELPER#