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

set -e

if [ "$1" = remove ]; then
    # Undo the addition of the plugin
    if [ -e "/etc/nsswitch.conf" ]; then
        sed -i -e '/^passwd:.*tacplus\s/s/tacplus\s//' \
            /etc/nsswitch.conf || true # don't prevent remove on error
        sed -i -e '/^group:.*tacplus\s/s/tacplus\s//' \
            /etc/nsswitch.conf || true # don't prevent remove on error
    fi
fi

#DEBHELPER#