aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mail/dcc-dccd/Makefile14
-rw-r--r--mail/dcc-dccd/files/pkg-deinstall.in13
-rw-r--r--mail/dcc-dccd/files/pkg-install.in30
3 files changed, 7 insertions, 50 deletions
diff --git a/mail/dcc-dccd/Makefile b/mail/dcc-dccd/Makefile
index d36100f6f672..2b6eb7eebe20 100644
--- a/mail/dcc-dccd/Makefile
+++ b/mail/dcc-dccd/Makefile
@@ -56,9 +56,10 @@ OPTIONS= DCCIFD "DCC interface daemon (for SpamAssassin etc)" on \
## User for DCC files and SUID binaries
#
DCCUSER?= dcc
-DCCUID?= 112
DCCGROUP?= dcc
-DCCGID?= 112
+
+USERS= ${DCCUSER}
+GROUPS= ${DCCGROUP}
PLIST_SUB+= DCCUSER="${DCCUSER}"
@@ -69,9 +70,8 @@ CONFIGURE_ARGS= --with-uid=${DCCUSER} --bindir=${PREFIX}/bin --mandir=${MANPREFI
.include <bsd.port.options.mk>
-SUB_FILES= pkg-install pkg-deinstall pkg-message
-SUB_LIST+= WRKSRC=${WRKSRC} DCCUSER=${DCCUSER} DCCUID=${DCCUID} \
- DCCGROUP=${DCCGROUP} DCCGID=${DCCGID} DCCHOME=${DCCHOME}
+SUB_FILES= pkg-install pkg-message
+SUB_LIST+= WRKSRC=${WRKSRC} DCCHOME=${DCCHOME}
## /var/dcc home support
#
@@ -176,10 +176,6 @@ pre-everything::
@${ECHO_MSG} 'A description of ALT_HOME may be found in the port's Makefile.'
@${ECHO_MSG} ' '
-pre-install:
- @${SETENV} PKG_PREFIX=${PREFIX} \
- ${SH} ${PKGINSTALL} ${PREFIX} PRE-INSTALL
-
post-install:
## Make certain DCC's config files are owned by DCC's user
diff --git a/mail/dcc-dccd/files/pkg-deinstall.in b/mail/dcc-dccd/files/pkg-deinstall.in
deleted file mode 100644
index 59a4b03e0d5a..000000000000
--- a/mail/dcc-dccd/files/pkg-deinstall.in
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-# $FreeBSD: /tmp/pcvs/ports/mail/dcc-dccd/files/Attic/pkg-deinstall.in,v 1.1 2010-01-31 03:45:21 pgollucci Exp $
-
-if [ "$2" != "POST-DEINSTALL" ]; then
- exit 0
-fi
-
-DCCUSER=%%DCCUSER%%
-
-if pw usershow "${DCCUSER}" 2>/dev/null 1>&2; then
- echo "To delete ${DCCUSER} user permanently, use 'pw userdel \"${DCCUSER}\"'"
-fi
-exit 0
diff --git a/mail/dcc-dccd/files/pkg-install.in b/mail/dcc-dccd/files/pkg-install.in
index dfa2f2d89e95..75f40d4b5bb6 100644
--- a/mail/dcc-dccd/files/pkg-install.in
+++ b/mail/dcc-dccd/files/pkg-install.in
@@ -1,37 +1,11 @@
#!/bin/sh
-# $FreeBSD: /tmp/pcvs/ports/mail/dcc-dccd/files/pkg-install.in,v 1.1 2010-01-31 03:45:21 pgollucci Exp $
+# $FreeBSD: /tmp/pcvs/ports/mail/dcc-dccd/files/pkg-install.in,v 1.2 2011-07-04 19:39:45 crees Exp $
PREFIX=${PKG_PREFIX:-%%PREFIX%%}
-DCCUSER=%%DCCUSER%%
-DCCUID=%%DCCUID%%
-DCCGROUP=%%DCCGROUP%%
-DCCGID=%%DCCGID%%
DCCHOME=%%DCCHOME%%
-if [ "$2" = "PRE-INSTALL" ]; then
-
- if ! pw groupshow "$DCCGROUP" 2>/dev/null 1>&2; then
- if pw groupadd $DCCGROUP -g $DCCGID; then
- echo "=> Added group \"$DCCGROUP\"."
- else
- echo "=> Adding group \"$DCCGROUP\" failed..."
- exit 1
- fi
- fi
-
- if ! pw usershow "$DCCUSER" 2>/dev/null 1>&2; then
- if pw useradd $DCCUSER -u $DCCUID -g $DCCGROUP -h - \
- -s "/sbin/nologin" -d "$DCCHOME" \
- -c "Distributed Checksum Clearinghouse"; \
- then
- echo "=> Added user \"$DCCUSER\"."
- else
- echo "=> Adding user \"$DCCUSER\" failed..."
- exit 1
- fi
- fi
-elif [ "$2" = "POST-INSTALL" ]; then
+if [ "$2" = "POST-INSTALL" ]; then
echo "=> Generating unique passwords for your DCC install..."
echo "=>"