Fix creation of /var/log/exim, which I botched when making EXIM_USER

and EXIM_GROUP operator-overidable.

Submitted by:	eik
This commit is contained in:
Sheldon Hearn 2004-01-31 15:27:22 +00:00
parent fadc6707e1
commit 06a6053bab
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=99623
3 changed files with 12 additions and 12 deletions

View File

@ -368,12 +368,16 @@ RC_SUFX= .sh
SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \
-e 's,%%DOCSDIR%%,${DOCSDIR},g' \
-e 's,%%EXAMPLESDIR%%,${EXAMPLESDIR},g' \
-e 's,%%EXIM_USER%%,${EXIM_USER},g' \
-e 's,%%EXIM_GROUP%%,${EXIM_GROUP},g' \
-e 's,%%RC_SUBR%%,${RC_SUBR},g' \
-e 's,%%RC_DIR%%,${RC_DIR},g' \
-e 's,%%RC_SUFX%%,${RC_SUFX},g'
PLIST_SUB+= RC_DIR=${RC_DIR} \
RC_SUFX=${RC_SUFX}
RC_SUFX=${RC_SUFX} \
EXIM_USER=${EXIM_USER} \
EXIM_GROUP=${EXIM_GROUP}
.if ${OSVERSION} < 400014
WITHOUT_IPV6= yes
@ -395,12 +399,8 @@ pre-everything::
do-configure:
@${MKDIR} ${WRKSRC}/Local
@${SED} ${SEDLIST} ${WRKSRC}/src/EDITME > ${WRKSRC}/Local/Makefile
@${SED} -e 's/XX_EXIM_USER_XX/${EXIM_USER}/' \
-e 's/XX_EXIM_GROUP_XX/${EXIM_GROUP}/' \
< ${PKGDIR}/pkg-install > ${PKGINSTALL}
@${REINPLACE_CMD} -e 's/XX_EXIM_USER_XX/${EXIM_USER}/' \
-e 's/XX_EXIM_GROUP_XX/${EXIM_GROUP}/' \
${WRKSRC}/src/configure.default
@${SED} ${SED_SCRIPT} ${MASTERDIR}/pkg-install > ${PKGINSTALL}
@${REINPLACE_CMD} ${SEDLIST} ${WRKSRC}/src/configure.default
@${REINPLACE_CMD} -e 's/"(Exim $$version_number)\\n\\t"/"(Exim $$version_number; ${OPSYS})\\n\\t"/' \
${WRKSRC}/src/globals.c
@${REINPLACE_CMD} -e 's/^#include "cnumber\.h"$$/${PORTREVISION}/' ${WRKSRC}/src/version.c

View File

@ -11,10 +11,10 @@
# $FreeBSD$
#
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
PKG_PREFIX=${PKG_PREFIX:=%%PREFIX%%}
user=XX_EXIM_USER_XX
group=XX_EXIM_GROUP_XX
user=%%EXIM_USER%%
group=%%EXIM_GROUP%%
if [ "$2" = "PRE-INSTALL" ]; then
if ! /usr/bin/id ${user} > /dev/null; then
@ -25,6 +25,8 @@ if [ "$2" = "PRE-INSTALL" ]; then
echo "Exim requires group ${group}. Please update your system." 1>&2
exit 1
fi
/bin/mkdir -p /var/log/exim
/usr/sbin/chown ${user}:${group} /var/log/exim
fi
if [ "$2" = "POST-INSTALL" ]; then

View File

@ -46,6 +46,4 @@ etc/exim/configure.default
@unexec rmdir %B 2>/dev/null || true
@cwd %%RC_DIR%%
exim%%RC_SUFX%%
@exec mkdir -p /var/log/exim
@exec chown mailnull:mail /var/log/exim
@unexec rmdir /var/log/exim 2>/dev/null || true