head	1.13;
access;
symbols
	RELEASE_8_3_0:1.12
	RELEASE_9_0_0:1.12
	RELEASE_7_4_0:1.12
	RELEASE_8_2_0:1.12
	RELEASE_6_EOL:1.12
	RELEASE_8_1_0:1.12
	RELEASE_7_3_0:1.12
	RELEASE_8_0_0:1.12
	RELEASE_7_2_0:1.12
	RELEASE_7_1_0:1.12
	RELEASE_6_4_0:1.12
	RELEASE_5_EOL:1.12
	RELEASE_7_0_0:1.12
	RELEASE_6_3_0:1.12
	PRE_XORG_7:1.12
	RELEASE_4_EOL:1.12
	RELEASE_6_2_0:1.12
	RELEASE_6_1_0:1.12
	RELEASE_5_5_0:1.12
	RELEASE_6_0_0:1.12
	RELEASE_5_4_0:1.12
	RELEASE_4_11_0:1.12
	RELEASE_5_3_0:1.12
	RELEASE_4_10_0:1.12
	RELEASE_5_2_1:1.11
	RELEASE_5_2_0:1.11
	RELEASE_4_9_0:1.11
	RELEASE_5_1_0:1.8
	RELEASE_4_8_0:1.8
	RELEASE_5_0_0:1.7
	RELEASE_4_7_0:1.7
	old_RELEASE_4_6_1:1.5
	old_RELEASE_4_6_0:1.5
	old_RELEASE_5_0_DP1:1.3
	old_RELEASE_4_5_0:1.3
	old_RELEASE_4_4_0:1.1
	old_RELEASE_4_3_0:1.1
	old_RELEASE_4_2_0:1.1;
locks; strict;
comment	@# @;


1.13
date	2012.11.17.06.01.03;	author svnexp;	state Exp;
branches;
next	1.12;

1.12
date	2004.03.30.15.28.07;	author ume;	state Exp;
branches;
next	1.11;

1.11
date	2003.07.20.06.29.25;	author ume;	state Exp;
branches;
next	1.10;

1.10
date	2003.06.07.11.46.04;	author ume;	state Exp;
branches;
next	1.9;

1.9
date	2003.06.01.04.21.05;	author ume;	state Exp;
branches;
next	1.8;

1.8
date	2003.01.30.14.04.02;	author ume;	state Exp;
branches;
next	1.7;

1.7
date	2002.08.29.17.57.31;	author ume;	state Exp;
branches;
next	1.6;

1.6
date	2002.08.08.14.04.43;	author ume;	state Exp;
branches;
next	1.5;

1.5
date	2002.05.24.02.01.13;	author dwcjr;	state Exp;
branches;
next	1.4;

1.4
date	2002.05.21.15.08.58;	author dwcjr;	state Exp;
branches;
next	1.3;

1.3
date	2002.01.17.15.04.35;	author kevlo;	state Exp;
branches;
next	1.2;

1.2
date	2001.12.20.12.18.57;	author ijliao;	state Exp;
branches;
next	1.1;

1.1
date	2000.11.01.12.00.13;	author jeh;	state Exp;
branches;
next	;


desc
@@


1.13
log
@Switch exporter over
@
text
@#!/bin/sh
#
#	$FreeBSD: head/security/cyrus-sasl2/pkg-deinstall 300897 2012-07-14 14:29:18Z beat $
#
# Created by: hetzels@@westbend.net

#set -vx

PKG_BATCH=${BATCH:=NO}

PKG_PREFIX=${PKG_PREFIX:=/usr/local}

SASLDB_NAME=${PKG_PREFIX}/etc/%%SASLDB%%

CYRUS_USER=${CYRUS_USER:=%%CYRUS_USER%%}
CYRUS_GROUP=${CYRUS_GROUP:=%%CYRUS_GROUP%%}

# delete sasldb database

delete_sasldb() {
	if [ -f ${SASLDB_NAME} ] ; then
		if [ `${PKG_PREFIX}/sbin/sasldblistusers2 | wc -l` -eq 0 ]; then
			rm ${SASLDB_NAME}
		else
			echo "WARNING: Users SASL passwords are in ${SASLDB_NAME}, keeping this file"
		fi
	fi
}

delete_user() {
	if pw usershow ${CYRUS_USER} 2>/dev/null 1>&2; then
		echo "To delete Cyrus user permanently, use 'pw userdel ${CYRUS_USER}'"
	fi
	if pw groupshow ${CYRUS_GROUP} 2>/dev/null 1>&2; then
		echo "To delete Cyrus group permanently, use 'pw groupdel ${CYRUS_GROUP}'"
	fi

}

case $2 in
	DEINSTALL)
		delete_sasldb
		;;
	POST-DEINSTALL)
		delete_user
		;;

esac
@


1.12
log
@cosmetic changes.
@
text
@d3 1
a3 1
#	$FreeBSD: ports/security/cyrus-sasl2/pkg-deinstall,v 1.11 2003/07/20 06:29:25 ume Exp $
@


1.11
log
@Stop installing Sendmail.conf by cyrus-sasl2, and it is now installed
by cyrus-sasl2-saslauthd.  Since if Sendmail.conf is not installed,
SASL2 uses auxprop by default, it is enough to install Sendmail.conf
by saslauthd port.
@
text
@d3 1
a3 1
#	$FreeBSD: ports/security/cyrus-sasl2/pkg-deinstall,v 1.10 2003/06/07 11:46:04 ume Exp $
d22 1
a22 1
		if [ `${PKG_PREFIX}/sbin/sasldblistusers2 | wc -l` -eq 0 ] ; then
@


1.10
log
@Sync with cyrus-sasl port.  There is no functional change.

Obtained from:	cyrus-sasl port
@
text
@d3 1
a3 1
#	$FreeBSD: ports/security/cyrus-sasl2/pkg-deinstall,v 1.9 2003/06/01 04:21:05 ume Exp $
a17 10
remove_file()
{
	file=$1

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

a39 9
# This should really be uninstalled by Sendmail

sendmail_conf() {
	if [ -f ${PKG_PREFIX}/lib/sasl2/Sendmail.conf ]; then
		echo "pwcheck_method: auxprop" > ${PKG_PREFIX}/lib/sasl2/Sendmail.conf.tmp
		remove_file ${PKG_PREFIX}/lib/sasl2/Sendmail.conf
	fi
}

a42 1
		sendmail_conf
@


1.9
log
@- Make saslauthd a separate port to avoid dependency loop between
  cyrus-sasl2 and openldap.
- Stop using configuration menu.  I believe it ease to maintain
  consistency with other SASL related ports.
@
text
@d3 1
a3 1
#	$FreeBSD: ports/security/cyrus-sasl2/pkg-deinstall,v 1.8 2003/01/30 14:04:02 ume Exp $
d18 10
d55 1
a55 4
		if cmp -s ${PKG_PREFIX}/lib/sasl2/Sendmail.conf ${PKG_PREFIX}/lib/sasl2/Sendmail.conf.tmp; then
			rm -f ${PKG_PREFIX}/lib/sasl2/Sendmail.conf
		fi
		rm -f ${PKG_PREFIX}/lib/sasl2/Sendmail.conf.tmp
@


1.8
log
@Add CYRUS_USER and CYRUS_GROUP options to be able to configure
psuedo user for cyrus.

Requested by:	Cyrus Anderson Yunker <cayunker@@unity.ncsu.edu>
@
text
@d3 1
a3 1
#	$FreeBSD: ports/security/cyrus-sasl2/pkg-deinstall,v 1.7 2002/08/29 17:57:31 ume Exp $
d44 1
a44 1
		echo "pwcheck_method: %%PWCHECK_METHOD%%" > ${PKG_PREFIX}/lib/sasl2/Sendmail.conf.tmp
@


1.7
log
@Add description about sendmail with SASLv2.
@
text
@d3 1
a3 1
#	$FreeBSD: ports/security/cyrus-sasl2/pkg-deinstall,v 1.6 2002/08/08 14:04:43 ume Exp $
d15 3
d31 2
a32 2
	if pw usershow cyrus 2>/dev/null 1>&2; then
		echo "To delete Cyrus user permanently, use 'pw userdel cyrus'"
d34 2
a35 2
	if pw groupshow cyrus 2>/dev/null 1>&2; then
		echo "To delete Cyrus group permanently, use 'pw groupdel cyrus'"
@


1.6
log
@Add cyrus-sasl-2.1.6 after repo. copy.
@
text
@d3 1
a3 1
#	$FreeBSD: ports/security/cyrus-sasl2/pkg-deinstall,v 1.5 2002/05/24 02:01:13 dwcjr Exp $
d37 12
d52 1
@


1.5
log
@Do not add a shell to cyrus user.

PR:		38434
Submitted by:	maintainer
@
text
@d3 1
a3 1
#	$FreeBSD: ports/security/cyrus-sasl/pkg-deinstall,v 1.4 2002/05/21 15:08:58 dwcjr Exp $
d19 1
a19 1
		if [ `${PKG_PREFIX}/sbin/sasldblistusers | wc -l` -eq 0 ] ; then
a36 12
# This should really be uninstalled by Sendmail

sendmail_conf() {
	if [ -f ${PKG_PREFIX}/lib/sasl/Sendmail.conf ]; then
		echo "pwcheck_method: pwcheck" > ${PKG_PREFIX}/lib/sasl/Sendmail.conf.tmp
		if cmp -s ${PKG_PREFIX}/lib/sasl/Sendmail.conf ${PKG_PREFIX}/lib/sasl/Sendmail.conf.tmp; then
			rm -f ${PKG_PREFIX}/lib/sasl/Sendmail.conf
		fi
		rm -f ${PKG_PREFIX}/lib/sasl/Sendmail.conf.tmp
	fi
}

a39 1
		sendmail_conf
@


1.4
log
@Fix for DB3 & KRB4

PR:		38363
Submitted by:	maintainer
@
text
@d3 1
a3 1
#	$FreeBSD: ports/security/cyrus-sasl/pkg-deinstall,v 1.3 2002/01/17 15:04:35 kevlo Exp $
d30 3
@


1.3
log
@Update to version 1.5.27

PR: 33603
Submitted by: MAINTAINER
@
text
@d3 1
a3 1
#	$FreeBSD: ports/security/cyrus-sasl/pkg-deinstall,v 1.2 2001/12/20 12:18:57 ijliao Exp $
d27 7
d52 1
@


1.2
log
@refer to correct location in pkg-message
correct db filename
fix pkg-install script

PR:		29731
Submitted by:	maintainer
@
text
@d3 1
a3 1
#	$FreeBSD: ports/security/cyrus-sasl/pkg-deinstall,v 1.1 2000/11/01 12:00:13 jeh Exp $
d18 7
a24 1
	[ -f ${SASLDB_NAME} -a ! -s ${SASLDB_NAME} ] && rm ${SASLDB_NAME}
@


1.1
log
@New file

PR:		22462
@
text
@d3 1
a3 1
#	$FreeBSD$
d13 2
d18 1
a18 1
	[ -f %D/etc/sasldb.db -a ! -s %D/etc/sasldb.db ] && rm %D/etc/sasldb.db
@

