1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

Allow to install exim with EXIM_USER=exim EXIM_GROUP=exim instead of

mailnull:mail.

PR:		ports/89832
Submitted by:	Artis Caune <Artis.Caune@latnet.lv>
This commit is contained in:
Kirill Ponomarev 2006-01-07 22:48:20 +00:00
parent 1606246c95
commit 20f596fffb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=153021
2 changed files with 6 additions and 4 deletions

View File

@ -630,6 +630,9 @@ post-build:
.if !defined(EXIMON_ONLY)
pre-install:
if ! /usr/sbin/pw groupshow ${EXIM_GROUP}; then /usr/sbin/pw groupadd ${EXIM_GROUP} -g 125; fi
if ! /usr/sbin/pw usershow ${EXIM_USER}; then /usr/sbin/pw useradd ${EXIM_USER} -g ${EXIM_GROUP} -u 125 \
-h - -d /var/spool/exim -s /nonexistent -c "Exim User"; fi
@[ -d "${DESTDIR}/etc" ] || ${MKDIR} "${DESTDIR}/etc"
@${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL

View File

@ -20,12 +20,11 @@ logdir=$PKG_DESTDIR%%LOGDIR%%
if [ "$2" = "PRE-INSTALL" ]; then
if ! /usr/bin/id ${user} > /dev/null; then
echo "Exim requires user ${user}. Please update your system." 1>&2
exit 1
/usr/sbin/pw useradd ${EXIM_USER} -g ${EXIM_GROUP} -u 125 \
-h - -d /var/spool/exim -s /nonexistent -c "Exim User"
fi
if ! /usr/bin/grep -q "^${group}:" /etc/group; then
echo "Exim requires group ${group}. Please update your system." 1>&2
exit 1
/usr/sbin/pw groupadd ${EXIM_GROUP} -g 125
fi
/bin/mkdir -p ${logdir}
/usr/sbin/chown ${user}:${group} ${logdir}