summaryrefslogtreecommitdiff
path: root/debian/libnss-mapuser.prerm
blob: c4f259f377c02d5dba2d925e5a27615753895f2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/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//' \
            -e '/^group:.*[ \t]mapname/s/[ \t]mapname//' \
            /etc/nsswitch.conf || true # don't prevent remove on error
    fi
fi

#DEBHELPER#