aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Rees <crees@FreeBSD.org>2011-08-14 16:46:14 +0000
committerChris Rees <crees@FreeBSD.org>2011-08-14 16:46:14 +0000
commit5b6abe5bebd57d3dc60b32453eb9839b0667ec45 (patch)
tree538c077e840c914f8b7fee145fb1c04a45704267
parent358b9d259e5ea5ca3b4954ab60c88814c436e975 (diff)
downloadports-5b6abe5bebd57d3dc60b32453eb9839b0667ec45.tar.gz
ports-5b6abe5bebd57d3dc60b32453eb9839b0667ec45.zip
mail/mixminion now uses USERS
Notes
Notes: svn path=/head/; revision=279709
-rw-r--r--GIDs1
-rw-r--r--UIDs1
-rw-r--r--mail/mixminion/Makefile4
-rw-r--r--mail/mixminion/pkg-deinstall62
-rw-r--r--mail/mixminion/pkg-install40
5 files changed, 4 insertions, 104 deletions
diff --git a/GIDs b/GIDs
index 45f7de12eebb..f6e1603d78c0 100644
--- a/GIDs
+++ b/GIDs
@@ -98,6 +98,7 @@ dspam:*:202:
yate:*:204:
gnugk:*:205:
gini:*:206:
+_mixminion:*:207:
shoutcast:*:210:
git:*:211:
hg:*:212:
diff --git a/UIDs b/UIDs
index e0056b86ead5..253295ba8bd9 100644
--- a/UIDs
+++ b/UIDs
@@ -105,6 +105,7 @@ dspam:*:202:202::0:0:Dspam:/nonexistent:/usr/sbin/nologin
yate:*:204:204::0:0:Yate:/nonexistent:/usr/sbin/nologin
gnugk:*:205:205::0:0:GNU GateKeeper pseudo-user:/nonexistent:/usr/sbin/nologin
gini:*:206:206::0:0:& streaming server:/var/log/gini:/usr/sbin/nologin
+_mixminion:*:207:207::0:0:Mixminion server:/nonexistent:/usr/sbin/nologin
shoutcast:*:210:210::0:0:Shoutcast sandbox:/nonexistent:/bin/sh
git:*:211:211::0:0:gitosis user:/usr/local/git:/bin/sh
hg:*:212:212::0:0:mercurial-server user:/usr/local/hg:/bin/sh
diff --git a/mail/mixminion/Makefile b/mail/mixminion/Makefile
index 61e71ac7f83f..f4cc7d5a0905 100644
--- a/mail/mixminion/Makefile
+++ b/mail/mixminion/Makefile
@@ -33,6 +33,8 @@ OPTIONS= SERVER "Also install the server" on
USE_RC_SUBR+= mixminiond
SUB_FILES+= pkg-message
PLIST_SUB+= SERVER=""
+USERS= _${PORTNAME:L}
+GROUPS= ${USERS}
.else
PLIST_SUB+= SERVER="@comment "
.endif
@@ -46,8 +48,6 @@ post-install:
${PREFIX}/etc/mixminiond.conf.sample
@${INSTALL_DATA} ${WRKSRC}/etc/blacklist.conf \
${PREFIX}/etc/blacklist.conf.sample
- @${SETENV} PKG_PREFIX=${PREFIX} ${SH} \
- ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
@-${MKDIR} /var/spool/mixminion
@${CHOWN} _mixminion:_mixminion /var/spool/mixminion
@${CHMOD} 0700 /var/spool/mixminion
diff --git a/mail/mixminion/pkg-deinstall b/mail/mixminion/pkg-deinstall
deleted file mode 100644
index 2ea7fc9e2754..000000000000
--- a/mail/mixminion/pkg-deinstall
+++ /dev/null
@@ -1,62 +0,0 @@
-#! /bin/sh
-#
-# taken from net/cvsup-mirror
-
-PATH=/bin:/usr/sbin
-
-MIXMINION_USER=${MIXMINION_USER:-_mixminion}
-MIXMINION_GROUP=${MIXMINION_GROUP:-_mixminion}
-
-ask() {
- local question default answer
-
- question=$1
- default=$2
- if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then
- read -p "${question} [${default}]? " answer
- fi
- if [ x${answer} = x ]; then
- answer=${default}
- fi
- echo ${answer}
-}
-
-yesno() {
- local dflt question answer
-
- question=$1
- dflt=$2
- while :; do
- answer=$(ask "${question}" "${dflt}")
- case "${answer}" in
- [Yy]*) return 0;;
- [Nn]*) return 1;;
- esac
- echo "Please answer yes or no."
- done
-}
-
-delete_account() {
- local u g home
-
- u=$1
- g=$2
- if yesno "Do you want me to remove group \"${g}\"" y; then
- pw groupdel -n ${g}
- echo "Done."
- fi
- if yesno "Do you want me to remove user \"${u}\"" y; then
- eval home=~${u}
- pw userdel -n ${u}
- echo "Done."
- if [ -d "${home}" ]; then
- echo "Please remember to remove the home directory \"${home}\""
- fi
- fi
-}
-
-if [ x$2 != xDEINSTALL ]; then
- exit
-fi
-
-delete_account ${MIXMINION_USER} ${MIXMINION_GROUP}
diff --git a/mail/mixminion/pkg-install b/mail/mixminion/pkg-install
deleted file mode 100644
index c09977eb917b..000000000000
--- a/mail/mixminion/pkg-install
+++ /dev/null
@@ -1,40 +0,0 @@
-#! /bin/sh
-#
-# taken from devel/perforce
-
-PATH=/bin:/usr/sbin
-
-MIXMINION_USER=${MIXMINION_USER:-_mixminion}
-MIXMINION_GROUP=${MIXMINION_GROUP:-_mixminion}
-
-case $2 in
-PRE-INSTALL)
- USER=${MIXMINION_USER}
- GROUP=${MIXMINION_GROUP}
-
- if pw group show "${GROUP}" 2>/dev/null; then
- echo "You already have a group \"${GROUP}\", so I will use it."
- else
- if pw groupadd ${GROUP} ; then
- echo "Added group \"${GROUP}\"."
- else
- echo "Adding group \"${GROUP}\" failed..."
- exit 1
- fi
- fi
-
- if pw user show "${USER}" 2>/dev/null; then
- echo "You already have a user \"${USER}\", so I will use it."
- else
- if pw useradd ${USER} -g ${GROUP} -h - \
- -d /nonexistent -c "Mixminion Daemon" -s /sbin/nologin
- then
- echo "Added user \"${USER}\"."
- else
- echo "Adding user \"${USER}\" failed..."
- exit 1
- fi
- fi
-
- ;;
-esac