summaryrefslogtreecommitdiff
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
parentupgrade to 4.4.2 (diff)
Make this port add shell to cyrus user.
PR: ports/38436 Submitted by: Scot W. Hetzel <hetzels@westbend.net>
Notes
Notes: svn path=/head/; revision=60000
-rw-r--r--mail/cyrus-imapd/Makefile1
-rw-r--r--mail/cyrus-imapd/pkg-deinstall23
-rw-r--r--mail/cyrus-imapd/pkg-install60
-rw-r--r--mail/cyrus-imapd2/Makefile1
-rw-r--r--mail/cyrus-imapd2/pkg-deinstall23
-rw-r--r--mail/cyrus-imapd2/pkg-install60
-rw-r--r--mail/cyrus-imapd22/Makefile1
-rw-r--r--mail/cyrus-imapd22/pkg-deinstall23
-rw-r--r--mail/cyrus-imapd22/pkg-install60
-rw-r--r--mail/cyrus-imapd23/Makefile1
-rw-r--r--mail/cyrus-imapd23/pkg-deinstall23
-rw-r--r--mail/cyrus-imapd23/pkg-install60
-rw-r--r--mail/cyrus-imapd24/Makefile1
-rw-r--r--mail/cyrus-imapd24/pkg-deinstall23
-rw-r--r--mail/cyrus-imapd24/pkg-install60
15 files changed, 165 insertions, 255 deletions
diff --git a/mail/cyrus-imapd/Makefile b/mail/cyrus-imapd/Makefile
index fba62bc5be05..7b263544d420 100644
--- a/mail/cyrus-imapd/Makefile
+++ b/mail/cyrus-imapd/Makefile
@@ -65,7 +65,6 @@ post-patch:
pre-install:
@ ${CP} ${WRKSRC}/man/quota.8 ${WRKSRC}/man/cyrquota.8
- @${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
@ ${MV} ${PREFIX}/cyrus/bin/quota ${PREFIX}/cyrus/bin/cyrquota
diff --git a/mail/cyrus-imapd/pkg-deinstall b/mail/cyrus-imapd/pkg-deinstall
index 7660fcc588a6..07501c786c70 100644
--- a/mail/cyrus-imapd/pkg-deinstall
+++ b/mail/cyrus-imapd/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
diff --git a/mail/cyrus-imapd/pkg-install b/mail/cyrus-imapd/pkg-install
index e79eba73b245..154d83b03038 100644
--- a/mail/cyrus-imapd/pkg-install
+++ b/mail/cyrus-imapd/pkg-install
@@ -7,61 +7,21 @@ PKG_BATCH=${BATCH:=NO}
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
#
-# create 'cyrus' user and group before installing
+# Modify the 'cyrus' user created from the cyrus-sasl port
#
-create() {
- if [ ! -x /usr/sbin/pw ]; then
- echo "*** Please add a user and a group named \`cyrus' before installing this package."
- exit 69
- fi
-
- if ! pw show group cyrus -q >/dev/null; then
- gid=60
- while pw show group -g ${gid} -q >/dev/null; do
- gid=`expr ${gid} + 1`
- done
- if ! pw add group cyrus -g ${gid}; then
- e=$?
- echo "*** Failed to add group \`cyrus'. Please add it manually."
- exit ${e}
- fi
- echo "*** Added group \`cyrus' (id ${gid})"
- else
- gid=`pw show group cyrus 2>/dev/null | cut -d: -f3`
- fi
+modify_cyrus_user() {
+ USER=cyrus
+ PW=/usr/sbin/pw
+ shell=/bin/csh
+ uhome=${PKG_PREFIX}/cyrus
- if [ -x /sbin/nologin ]; then
- shell=/sbin/nologin
- else
- shell=/nonexistent
- fi
- if ! pw show user cyrus -q >/dev/null; then
- uid=60
- while pw show user -u ${uid} -q >/dev/null; do
- uid=`expr ${uid} + 1`
- done
- if ! pw add user cyrus -u ${uid} -g ${gid} -d "/nonexistent" \
- -c "the cyrus mail server" -s "${shell}" -p "*" \
- ; then
- e=$?
- echo "*** Failed to add user \`cyrus'. Please add it manually."
- exit ${e}
- fi
- echo "*** Added user \`cyrus' (id ${uid})"
- else
- if ! pw mod user cyrus -g ${gid} -d "/nonexistent" \
- -c "the cyrus mail server" -s "${shell}" -p "*" \
- ; then
+ if ! ${PW} mod user ${USER} -d "${uhome}" -s "${shell}" \ ; then
e=$?
- echo "*** Failed to update user \`cyrus'."
+ echo "*** Failed to update user \`${USER}'."
exit ${e}
- fi
- echo "*** Updated user \`cyrus'."
- fi
- if ! pw group mod cyrus -m daemon; then
- echo "*** can't add user \`daemon' to group \`cyrus'"
fi
+ echo "*** Updated user \`${USER}'."
}
@@ -90,10 +50,10 @@ cyrus_conf() {
case $2 in
PRE-INSTALL)
- create
;;
POST-INSTALL)
+ modify_cyrus_user
cd ${PKG_PREFIX}
cyrus_conf
checkfile ${PKG_PREFIX}/etc/imapd.conf
diff --git a/mail/cyrus-imapd2/Makefile b/mail/cyrus-imapd2/Makefile
index fba62bc5be05..7b263544d420 100644
--- a/mail/cyrus-imapd2/Makefile
+++ b/mail/cyrus-imapd2/Makefile
@@ -65,7 +65,6 @@ post-patch:
pre-install:
@ ${CP} ${WRKSRC}/man/quota.8 ${WRKSRC}/man/cyrquota.8
- @${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
@ ${MV} ${PREFIX}/cyrus/bin/quota ${PREFIX}/cyrus/bin/cyrquota
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
diff --git a/mail/cyrus-imapd2/pkg-install b/mail/cyrus-imapd2/pkg-install
index e79eba73b245..154d83b03038 100644
--- a/mail/cyrus-imapd2/pkg-install
+++ b/mail/cyrus-imapd2/pkg-install
@@ -7,61 +7,21 @@ PKG_BATCH=${BATCH:=NO}
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
#
-# create 'cyrus' user and group before installing
+# Modify the 'cyrus' user created from the cyrus-sasl port
#
-create() {
- if [ ! -x /usr/sbin/pw ]; then
- echo "*** Please add a user and a group named \`cyrus' before installing this package."
- exit 69
- fi
-
- if ! pw show group cyrus -q >/dev/null; then
- gid=60
- while pw show group -g ${gid} -q >/dev/null; do
- gid=`expr ${gid} + 1`
- done
- if ! pw add group cyrus -g ${gid}; then
- e=$?
- echo "*** Failed to add group \`cyrus'. Please add it manually."
- exit ${e}
- fi
- echo "*** Added group \`cyrus' (id ${gid})"
- else
- gid=`pw show group cyrus 2>/dev/null | cut -d: -f3`
- fi
+modify_cyrus_user() {
+ USER=cyrus
+ PW=/usr/sbin/pw
+ shell=/bin/csh
+ uhome=${PKG_PREFIX}/cyrus
- if [ -x /sbin/nologin ]; then
- shell=/sbin/nologin
- else
- shell=/nonexistent
- fi
- if ! pw show user cyrus -q >/dev/null; then
- uid=60
- while pw show user -u ${uid} -q >/dev/null; do
- uid=`expr ${uid} + 1`
- done
- if ! pw add user cyrus -u ${uid} -g ${gid} -d "/nonexistent" \
- -c "the cyrus mail server" -s "${shell}" -p "*" \
- ; then
- e=$?
- echo "*** Failed to add user \`cyrus'. Please add it manually."
- exit ${e}
- fi
- echo "*** Added user \`cyrus' (id ${uid})"
- else
- if ! pw mod user cyrus -g ${gid} -d "/nonexistent" \
- -c "the cyrus mail server" -s "${shell}" -p "*" \
- ; then
+ if ! ${PW} mod user ${USER} -d "${uhome}" -s "${shell}" \ ; then
e=$?
- echo "*** Failed to update user \`cyrus'."
+ echo "*** Failed to update user \`${USER}'."
exit ${e}
- fi
- echo "*** Updated user \`cyrus'."
- fi
- if ! pw group mod cyrus -m daemon; then
- echo "*** can't add user \`daemon' to group \`cyrus'"
fi
+ echo "*** Updated user \`${USER}'."
}
@@ -90,10 +50,10 @@ cyrus_conf() {
case $2 in
PRE-INSTALL)
- create
;;
POST-INSTALL)
+ modify_cyrus_user
cd ${PKG_PREFIX}
cyrus_conf
checkfile ${PKG_PREFIX}/etc/imapd.conf
diff --git a/mail/cyrus-imapd22/Makefile b/mail/cyrus-imapd22/Makefile
index fba62bc5be05..7b263544d420 100644
--- a/mail/cyrus-imapd22/Makefile
+++ b/mail/cyrus-imapd22/Makefile
@@ -65,7 +65,6 @@ post-patch:
pre-install:
@ ${CP} ${WRKSRC}/man/quota.8 ${WRKSRC}/man/cyrquota.8
- @${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
@ ${MV} ${PREFIX}/cyrus/bin/quota ${PREFIX}/cyrus/bin/cyrquota
diff --git a/mail/cyrus-imapd22/pkg-deinstall b/mail/cyrus-imapd22/pkg-deinstall
index 7660fcc588a6..07501c786c70 100644
--- a/mail/cyrus-imapd22/pkg-deinstall
+++ b/mail/cyrus-imapd22/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
diff --git a/mail/cyrus-imapd22/pkg-install b/mail/cyrus-imapd22/pkg-install
index e79eba73b245..154d83b03038 100644
--- a/mail/cyrus-imapd22/pkg-install
+++ b/mail/cyrus-imapd22/pkg-install
@@ -7,61 +7,21 @@ PKG_BATCH=${BATCH:=NO}
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
#
-# create 'cyrus' user and group before installing
+# Modify the 'cyrus' user created from the cyrus-sasl port
#
-create() {
- if [ ! -x /usr/sbin/pw ]; then
- echo "*** Please add a user and a group named \`cyrus' before installing this package."
- exit 69
- fi
-
- if ! pw show group cyrus -q >/dev/null; then
- gid=60
- while pw show group -g ${gid} -q >/dev/null; do
- gid=`expr ${gid} + 1`
- done
- if ! pw add group cyrus -g ${gid}; then
- e=$?
- echo "*** Failed to add group \`cyrus'. Please add it manually."
- exit ${e}
- fi
- echo "*** Added group \`cyrus' (id ${gid})"
- else
- gid=`pw show group cyrus 2>/dev/null | cut -d: -f3`
- fi
+modify_cyrus_user() {
+ USER=cyrus
+ PW=/usr/sbin/pw
+ shell=/bin/csh
+ uhome=${PKG_PREFIX}/cyrus
- if [ -x /sbin/nologin ]; then
- shell=/sbin/nologin
- else
- shell=/nonexistent
- fi
- if ! pw show user cyrus -q >/dev/null; then
- uid=60
- while pw show user -u ${uid} -q >/dev/null; do
- uid=`expr ${uid} + 1`
- done
- if ! pw add user cyrus -u ${uid} -g ${gid} -d "/nonexistent" \
- -c "the cyrus mail server" -s "${shell}" -p "*" \
- ; then
- e=$?
- echo "*** Failed to add user \`cyrus'. Please add it manually."
- exit ${e}
- fi
- echo "*** Added user \`cyrus' (id ${uid})"
- else
- if ! pw mod user cyrus -g ${gid} -d "/nonexistent" \
- -c "the cyrus mail server" -s "${shell}" -p "*" \
- ; then
+ if ! ${PW} mod user ${USER} -d "${uhome}" -s "${shell}" \ ; then
e=$?
- echo "*** Failed to update user \`cyrus'."
+ echo "*** Failed to update user \`${USER}'."
exit ${e}
- fi
- echo "*** Updated user \`cyrus'."
- fi
- if ! pw group mod cyrus -m daemon; then
- echo "*** can't add user \`daemon' to group \`cyrus'"
fi
+ echo "*** Updated user \`${USER}'."
}
@@ -90,10 +50,10 @@ cyrus_conf() {
case $2 in
PRE-INSTALL)
- create
;;
POST-INSTALL)
+ modify_cyrus_user
cd ${PKG_PREFIX}
cyrus_conf
checkfile ${PKG_PREFIX}/etc/imapd.conf
diff --git a/mail/cyrus-imapd23/Makefile b/mail/cyrus-imapd23/Makefile
index fba62bc5be05..7b263544d420 100644
--- a/mail/cyrus-imapd23/Makefile
+++ b/mail/cyrus-imapd23/Makefile
@@ -65,7 +65,6 @@ post-patch:
pre-install:
@ ${CP} ${WRKSRC}/man/quota.8 ${WRKSRC}/man/cyrquota.8
- @${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
@ ${MV} ${PREFIX}/cyrus/bin/quota ${PREFIX}/cyrus/bin/cyrquota
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
diff --git a/mail/cyrus-imapd23/pkg-install b/mail/cyrus-imapd23/pkg-install
index e79eba73b245..154d83b03038 100644
--- a/mail/cyrus-imapd23/pkg-install
+++ b/mail/cyrus-imapd23/pkg-install
@@ -7,61 +7,21 @@ PKG_BATCH=${BATCH:=NO}
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
#
-# create 'cyrus' user and group before installing
+# Modify the 'cyrus' user created from the cyrus-sasl port
#
-create() {
- if [ ! -x /usr/sbin/pw ]; then
- echo "*** Please add a user and a group named \`cyrus' before installing this package."
- exit 69
- fi
-
- if ! pw show group cyrus -q >/dev/null; then
- gid=60
- while pw show group -g ${gid} -q >/dev/null; do
- gid=`expr ${gid} + 1`
- done
- if ! pw add group cyrus -g ${gid}; then
- e=$?
- echo "*** Failed to add group \`cyrus'. Please add it manually."
- exit ${e}
- fi
- echo "*** Added group \`cyrus' (id ${gid})"
- else
- gid=`pw show group cyrus 2>/dev/null | cut -d: -f3`
- fi
+modify_cyrus_user() {
+ USER=cyrus
+ PW=/usr/sbin/pw
+ shell=/bin/csh
+ uhome=${PKG_PREFIX}/cyrus
- if [ -x /sbin/nologin ]; then
- shell=/sbin/nologin
- else
- shell=/nonexistent
- fi
- if ! pw show user cyrus -q >/dev/null; then
- uid=60
- while pw show user -u ${uid} -q >/dev/null; do
- uid=`expr ${uid} + 1`
- done
- if ! pw add user cyrus -u ${uid} -g ${gid} -d "/nonexistent" \
- -c "the cyrus mail server" -s "${shell}" -p "*" \
- ; then
- e=$?
- echo "*** Failed to add user \`cyrus'. Please add it manually."
- exit ${e}
- fi
- echo "*** Added user \`cyrus' (id ${uid})"
- else
- if ! pw mod user cyrus -g ${gid} -d "/nonexistent" \
- -c "the cyrus mail server" -s "${shell}" -p "*" \
- ; then
+ if ! ${PW} mod user ${USER} -d "${uhome}" -s "${shell}" \ ; then
e=$?
- echo "*** Failed to update user \`cyrus'."
+ echo "*** Failed to update user \`${USER}'."
exit ${e}
- fi
- echo "*** Updated user \`cyrus'."
- fi
- if ! pw group mod cyrus -m daemon; then
- echo "*** can't add user \`daemon' to group \`cyrus'"
fi
+ echo "*** Updated user \`${USER}'."
}
@@ -90,10 +50,10 @@ cyrus_conf() {
case $2 in
PRE-INSTALL)
- create
;;
POST-INSTALL)
+ modify_cyrus_user
cd ${PKG_PREFIX}
cyrus_conf
checkfile ${PKG_PREFIX}/etc/imapd.conf
diff --git a/mail/cyrus-imapd24/Makefile b/mail/cyrus-imapd24/Makefile
index fba62bc5be05..7b263544d420 100644
--- a/mail/cyrus-imapd24/Makefile
+++ b/mail/cyrus-imapd24/Makefile
@@ -65,7 +65,6 @@ post-patch:
pre-install:
@ ${CP} ${WRKSRC}/man/quota.8 ${WRKSRC}/man/cyrquota.8
- @${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
@ ${MV} ${PREFIX}/cyrus/bin/quota ${PREFIX}/cyrus/bin/cyrquota
diff --git a/mail/cyrus-imapd24/pkg-deinstall b/mail/cyrus-imapd24/pkg-deinstall
index 7660fcc588a6..07501c786c70 100644
--- a/mail/cyrus-imapd24/pkg-deinstall
+++ b/mail/cyrus-imapd24/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
diff --git a/mail/cyrus-imapd24/pkg-install b/mail/cyrus-imapd24/pkg-install
index e79eba73b245..154d83b03038 100644
--- a/mail/cyrus-imapd24/pkg-install
+++ b/mail/cyrus-imapd24/pkg-install
@@ -7,61 +7,21 @@ PKG_BATCH=${BATCH:=NO}
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
#
-# create 'cyrus' user and group before installing
+# Modify the 'cyrus' user created from the cyrus-sasl port
#
-create() {
- if [ ! -x /usr/sbin/pw ]; then
- echo "*** Please add a user and a group named \`cyrus' before installing this package."
- exit 69
- fi
-
- if ! pw show group cyrus -q >/dev/null; then
- gid=60
- while pw show group -g ${gid} -q >/dev/null; do
- gid=`expr ${gid} + 1`
- done
- if ! pw add group cyrus -g ${gid}; then
- e=$?
- echo "*** Failed to add group \`cyrus'. Please add it manually."
- exit ${e}
- fi
- echo "*** Added group \`cyrus' (id ${gid})"
- else
- gid=`pw show group cyrus 2>/dev/null | cut -d: -f3`
- fi
+modify_cyrus_user() {
+ USER=cyrus
+ PW=/usr/sbin/pw
+ shell=/bin/csh
+ uhome=${PKG_PREFIX}/cyrus
- if [ -x /sbin/nologin ]; then
- shell=/sbin/nologin
- else
- shell=/nonexistent
- fi
- if ! pw show user cyrus -q >/dev/null; then
- uid=60
- while pw show user -u ${uid} -q >/dev/null; do
- uid=`expr ${uid} + 1`
- done
- if ! pw add user cyrus -u ${uid} -g ${gid} -d "/nonexistent" \
- -c "the cyrus mail server" -s "${shell}" -p "*" \
- ; then
- e=$?
- echo "*** Failed to add user \`cyrus'. Please add it manually."
- exit ${e}
- fi
- echo "*** Added user \`cyrus' (id ${uid})"
- else
- if ! pw mod user cyrus -g ${gid} -d "/nonexistent" \
- -c "the cyrus mail server" -s "${shell}" -p "*" \
- ; then
+ if ! ${PW} mod user ${USER} -d "${uhome}" -s "${shell}" \ ; then
e=$?
- echo "*** Failed to update user \`cyrus'."
+ echo "*** Failed to update user \`${USER}'."
exit ${e}
- fi
- echo "*** Updated user \`cyrus'."
- fi
- if ! pw group mod cyrus -m daemon; then
- echo "*** can't add user \`daemon' to group \`cyrus'"
fi
+ echo "*** Updated user \`${USER}'."
}
@@ -90,10 +50,10 @@ cyrus_conf() {
case $2 in
PRE-INSTALL)
- create
;;
POST-INSTALL)
+ modify_cyrus_user
cd ${PKG_PREFIX}
cyrus_conf
checkfile ${PKG_PREFIX}/etc/imapd.conf