diff options
author | ume <ume@FreeBSD.org> | 2002-05-26 02:39:19 +0800 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2002-05-26 02:39:19 +0800 |
commit | 7a13d00f2900b6f5fdde5b3744f55843b14d839f (patch) | |
tree | a3447fe9c4fa144d5a950d015017339cf0f8364e /mail/cyrus-imapd23/pkg-deinstall | |
parent | 12e06bad6de4072a600fee7b0978e187e0ae8c8b (diff) | |
download | freebsd-ports-gnome-7a13d00f2900b6f5fdde5b3744f55843b14d839f.tar.gz freebsd-ports-gnome-7a13d00f2900b6f5fdde5b3744f55843b14d839f.tar.zst freebsd-ports-gnome-7a13d00f2900b6f5fdde5b3744f55843b14d839f.zip |
Make this port add shell to cyrus user.
PR: ports/38436
Submitted by: Scot W. Hetzel <hetzels@westbend.net>
Diffstat (limited to 'mail/cyrus-imapd23/pkg-deinstall')
-rw-r--r-- | mail/cyrus-imapd23/pkg-deinstall | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mail/cyrus-imapd23/pkg-deinstall b/mail/cyrus-imapd23/pkg-deinstall index 7660fcc588a6..07501c786c70 100644 --- a/mail/cyrus-imapd23/pkg-deinstall +++ b/mail/cyrus-imapd23/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 |