aboutsummaryrefslogtreecommitdiff
path: root/mail/postfix21
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2004-04-13 15:08:15 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2004-04-13 15:08:15 +0000
commit26d0fd7623a3e8ea96a643eb371c65b7315e2aaf (patch)
tree6a63fa2bab548ddc7de867c729e43fe265633d18 /mail/postfix21
parent5941d1e60984d4e43b31488900937f128fbedabd (diff)
downloadports-26d0fd7623a3e8ea96a643eb371c65b7315e2aaf.tar.gz
ports-26d0fd7623a3e8ea96a643eb371c65b7315e2aaf.zip
Notes
Diffstat (limited to 'mail/postfix21')
-rw-r--r--mail/postfix21/pkg-install17
1 files changed, 13 insertions, 4 deletions
diff --git a/mail/postfix21/pkg-install b/mail/postfix21/pkg-install
index 8cf5a9a5aefe..44a1d6cbacc2 100644
--- a/mail/postfix21/pkg-install
+++ b/mail/postfix21/pkg-install
@@ -17,6 +17,12 @@ else
DEFAULT_REPLACE_MAILERCONF=y
fi
+if [ -x /usr/sbin/nologin ]; then
+ NOLOGIN=/usr/sbin/nologin
+else
+ NOLOGIN=/sbin/nologin
+fi
+
ask() {
local question default answer
@@ -48,13 +54,16 @@ yesno() {
if [ x"$2" = xPRE-INSTALL ]; then
USER=postfix
+ UID=125
GROUP=postfix
+ GID=125
GROUP2=maildrop
+ GID2=126
if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then
echo "You already have a group \"${GROUP}\", so I will use it."
else
- if /usr/sbin/pw groupadd ${GROUP} -h -
+ if /usr/sbin/pw groupadd ${GROUP} -g ${GID}
then
echo "Added group \"${GROUP}\"."
else
@@ -67,7 +76,7 @@ if [ x"$2" = xPRE-INSTALL ]; then
if /usr/sbin/pw groupshow "${GROUP2}" 2>/dev/null; then
echo "You already have a group \"${GROUP2}\", so I will use it."
else
- if /usr/sbin/pw groupadd ${GROUP2} -h -
+ if /usr/sbin/pw groupadd ${GROUP2} -g ${GID2}
then
echo "Added group \"${GROUP2}\"."
else
@@ -80,9 +89,9 @@ if [ x"$2" = xPRE-INSTALL ]; then
if /usr/sbin/pw user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
else
- if /usr/sbin/pw useradd ${USER} -g ${GROUP} -h - \
+ if /usr/sbin/pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-d /var/spool/postfix \
- -s /sbin/nologin \
+ -s ${NOLOGIN} \
-c "Postfix Mail System"
then
echo "Added user \"${USER}\"."