aboutsummaryrefslogtreecommitdiffstats
path: root/security/cyrus-sasl2-saslauthd/pkg-deinstall
blob: db4488ed1b72f290db6451c962502ad20b930eca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh
#
#   $FreeBSD$
#

PKG_BATCH=${BATCH:=NO}
PKG_PREFIX=${PKG_PREFIX:=/usr/local}

remove_file()
{
    file=$1

    if cmp -s ${file} ${file}.tmp; then
        rm -f ${file}
    fi
    rm -f ${file}.tmp
}

# This should really be uninstalled by Sendmail
sendmail_conf() {
    if [ -f ${PKG_PREFIX}/lib/sasl2/Sendmail.conf ]; then
        echo "pwcheck_method: saslauthd" > ${PKG_PREFIX}/lib/sasl2/Sendmail.conf.tmp
        remove_file ${PKG_PREFIX}/lib/sasl2/Sendmail.conf
    fi
}

case $2 in
DEINSTALL)
    sendmail_conf
    ;;
esac