summaryrefslogtreecommitdiff
path: root/security/cyrus-sasl/pkg-deinstall
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2003-02-26 11:25:55 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2003-02-26 11:25:55 +0000
commitc95cf31cd78d89df9fa2b3c0d12b5406ecd57292 (patch)
treebebd2fffcbad2f521bbb91ac08ad838cd98c2d94 /security/cyrus-sasl/pkg-deinstall
parent0530470b1497895f2b7632ff2b54a159814a7118 (diff)
downloadfreebsd-ports-c95cf31cd78d89df9fa2b3c0d12b5406ecd57292.zip
security/cyrus-sasl: Bento fails to build libkerberos + Upgrade
Bento fails to proberly package the port on -CURRENT due to -CURRENT no longer has libdes.* as the des functions have been moved to the libcrypto.* library. PR: 48442 Submitted by: Scot W. Hetzel <hetzels@westbend.net>
Diffstat (limited to 'security/cyrus-sasl/pkg-deinstall')
-rw-r--r--security/cyrus-sasl/pkg-deinstall32
1 files changed, 28 insertions, 4 deletions
diff --git a/security/cyrus-sasl/pkg-deinstall b/security/cyrus-sasl/pkg-deinstall
index 232102427a88..30fa993e9275 100644
--- a/security/cyrus-sasl/pkg-deinstall
+++ b/security/cyrus-sasl/pkg-deinstall
@@ -12,6 +12,32 @@ PKG_PREFIX=${PKG_PREFIX:=/usr/local}
SASLDB_NAME=${PKG_PREFIX}/etc/%%SASLDB%%
+remove_file()
+{
+ file=$1
+
+ if cmp -s ${file} ${file}.tmp; then
+ rm -f ${file}
+ fi
+ rm -f ${file}.tmp
+}
+
+delete_rc_conf_d() {
+ PWCHECK_CONF=${PKG_PREFIX}/etc/rc.conf.d/cyrus_pwcheck
+ SASLAUTHD_CONF=${PKG_PREFIX}/etc/rc.conf.d/saslauthd1
+
+ if [ -f ${SASLAUTHD_CONF} ]; then
+ echo "saslauthd1_enable=%%ENABLE_SASLAUTHD%%" >> ${SASLAUTHD_CONF}.tmp
+ echo "saslauthd1_flags=\"-a pam\"" >> ${SASLAUTHD_CONF}.tmp
+ remove_file ${SASLAUTHD_CONF}
+ fi
+ if [ -f ${PWCHECK_CONF} ]; then
+ echo "cyrus_pwcheck_enable=%%ENABLE_PWCHECK%%" > ${PWCHECK_CONF}.tmp
+ echo "cyrus_pwcheck_program=${PKG_PREFIX}/sbin/%%PWCHECK%%" >> ${PWCHECK_CONF}.tmp
+ remove_file ${PWCHECK_CONF}
+ fi
+}
+
# delete sasldb database
delete_sasldb() {
@@ -39,16 +65,14 @@ delete_user() {
sendmail_conf() {
if [ -f ${PKG_PREFIX}/lib/sasl/Sendmail.conf ]; then
echo "pwcheck_method: %%PWCHECK_METHOD%%" > ${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
+ remove_file ${PKG_PREFIX}/lib/sasl/Sendmail.conf
fi
}
case $2 in
DEINSTALL)
delete_sasldb
+ delete_rc_conf_d
sendmail_conf
;;
POST-DEINSTALL)