aboutsummaryrefslogtreecommitdiff
path: root/mail/cyrus-imapd2/pkg-deinstall
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2002-05-25 18:39:19 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2002-05-25 18:39:19 +0000
commit41c441f082c8bb9af22c70b948afc1f6f53d421e (patch)
treeb118cf72d94f60f98228a5064b7d34551cb8f97c /mail/cyrus-imapd2/pkg-deinstall
parent16e343a29f6c06d0ba2fe9a6cdf262c826dea70c (diff)
downloadports-41c441f082c8bb9af22c70b948afc1f6f53d421e.tar.gz
ports-41c441f082c8bb9af22c70b948afc1f6f53d421e.zip
Notes
Diffstat (limited to 'mail/cyrus-imapd2/pkg-deinstall')
-rw-r--r--mail/cyrus-imapd2/pkg-deinstall23
1 files changed, 23 insertions, 0 deletions
diff --git a/mail/cyrus-imapd2/pkg-deinstall b/mail/cyrus-imapd2/pkg-deinstall
index 7660fcc588a6..07501c786c70 100644
--- a/mail/cyrus-imapd2/pkg-deinstall
+++ b/mail/cyrus-imapd2/pkg-deinstall
@@ -35,6 +35,28 @@ cyrus_conf() {
fi
}
+#
+# Modify the 'cyrus' user created from the cyrus-sasl port
+#
+
+modify_cyrus_user() {
+ USER=cyrus
+ PW=/usr/sbin/pw
+ if [ -x /sbin/nologin ]; then
+ shell=/sbin/nologin
+ else
+ shell=/nonexistent
+ fi
+ uhome=/nonexistent
+
+ if ! ${PW} mod user ${USER} -d "${uhome}" -s "${shell}" \ ; then
+ e=$?
+ echo "*** Failed to update user \`${USER}'."
+ exit ${e}
+ fi
+ echo "*** Updated user \`${USER}'."
+}
+
case $2 in
DEINSTALL)
cd ${PKG_PREFIX}
@@ -43,6 +65,7 @@ case $2 in
checkfile ${PKG_PREIFX}/etc/cyrus.conf
;;
POST-DEINSTALL)
+ modify_cyrus_user
;;
esac