diff options
author | Kirill Ponomarev <krion@FreeBSD.org> | 2006-01-07 22:48:20 +0000 |
---|---|---|
committer | Kirill Ponomarev <krion@FreeBSD.org> | 2006-01-07 22:48:20 +0000 |
commit | 20f596fffb26380200b5000d23e3793abd79eae5 (patch) | |
tree | cf4374358a8d00e94566ce166e33e2d8d3a9a3d6 /mail/exim | |
parent | - ruby-romp was never removed (diff) |
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>
Notes
Notes:
svn path=/head/; revision=153021
Diffstat (limited to 'mail/exim')
-rw-r--r-- | mail/exim/Makefile | 3 | ||||
-rw-r--r-- | mail/exim/pkg-install | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/mail/exim/Makefile b/mail/exim/Makefile index 94467ddb171f..1e2a2ff3a851 100644 --- a/mail/exim/Makefile +++ b/mail/exim/Makefile @@ -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 diff --git a/mail/exim/pkg-install b/mail/exim/pkg-install index 2c5fa39eebe0..ee9dbcead7f6 100644 --- a/mail/exim/pkg-install +++ b/mail/exim/pkg-install @@ -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} |