diff options
author | garga <garga@FreeBSD.org> | 2005-08-09 21:58:39 +0800 |
---|---|---|
committer | garga <garga@FreeBSD.org> | 2005-08-09 21:58:39 +0800 |
commit | f98b36c9e68d3268b749ff54e9f77eb65539421a (patch) | |
tree | b734e8b887e256d888ca321d88332657b69d4f30 /mail/simscan | |
parent | 3a200a3c65c94523f55d258fa744f41b6530b8a7 (diff) | |
download | freebsd-ports-gnome-f98b36c9e68d3268b749ff54e9f77eb65539421a.tar.gz freebsd-ports-gnome-f98b36c9e68d3268b749ff54e9f77eb65539421a.tar.zst freebsd-ports-gnome-f98b36c9e68d3268b749ff54e9f77eb65539421a.zip |
Move adduser proccess from configure to pre-install time to prevent
problems to update using portupgrade.
PR: ports/83100
Submitted by: self
Approved by: portmgr (krion), Anton Karpov <toxa@toxahost.ru> (maintainer)
Diffstat (limited to 'mail/simscan')
-rw-r--r-- | mail/simscan/Makefile | 11 | ||||
-rw-r--r-- | mail/simscan/pkg-install | 2 | ||||
-rw-r--r-- | mail/simscan/scripts/configure | 36 |
3 files changed, 10 insertions, 39 deletions
diff --git a/mail/simscan/Makefile b/mail/simscan/Makefile index 04889ffce5e8..cd26374ee85f 100644 --- a/mail/simscan/Makefile +++ b/mail/simscan/Makefile @@ -18,6 +18,7 @@ COMMENT= Fast Content/Anti-virus Scanner for qmail Written in C BUILD_DEPENDS= ${QMAIL_QUEUE}:${PORTSDIR}/mail/qmail GNU_CONFIGURE= yes +USE_REINPLACE= yes # A normal qmail installation puts everything into /var/qmail/. # Must match your qmail installation @@ -42,7 +43,8 @@ OPTIONS= CLAMAV "Support for ClamAV Virus Scanning" on \ CONFIGURE_ARGS=--enable-clamavdb-path=/var/db/clamav \ --enable-qmaildir=${QMAIL_DIR} \ --enable-spamc-user=n \ - --enable-workdir=${WORKDIR} + --enable-workdir=${WORKDIR} \ + --enable-user=nobody .if defined(WITHOUT_CLAMAV) CONFIGURE_ARGS+= --enable-clamav=n @@ -130,9 +132,12 @@ pre-configure: @${ECHO_MSG} "=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=" @${ECHO_MSG} "" +pre-install: + @${REINPLACE_CMD} -e 's|nobody|simscan|g' ${WRKSRC}/Makefile + @${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + post-install: - @${CHMOD} 04711 ${QMAIL_DIR}/bin/simscan - @${CHOWN} simscan:simscan ${QMAIL_DIR}/bin/simscan ${QMAIL_DIR}/bin/simscanmk + @${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} .for i in ${PORTDOCS} diff --git a/mail/simscan/pkg-install b/mail/simscan/pkg-install index 43b739839251..a897bd6e098d 100644 --- a/mail/simscan/pkg-install +++ b/mail/simscan/pkg-install @@ -43,6 +43,8 @@ elif [ "$2" = "POST-INSTALL" ]; then /bin/mkdir -p "$SIMDIR" || exit 1 /usr/sbin/chown "$USER:$GROUP" "$SIMDIR" || exit 1 /bin/chmod 0750 "$SIMDIR" || exit 1 + /bin/chmod 04711 ${QMAIL_DIR}/bin/simscan + /bin/chown $USER:$GROUP ${QMAIL_DIR}/bin/simscan ${QMAIL_DIR}/bin/simscanmk fi fi diff --git a/mail/simscan/scripts/configure b/mail/simscan/scripts/configure deleted file mode 100644 index d502120cd0b5..000000000000 --- a/mail/simscan/scripts/configure +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ - -USER=simscan -GROUP=${USER} -UID=74 -GID=${UID} - -echo adding simscan user - - - 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} -g ${GID}; 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} -u ${UID} -g ${GROUP} -h - \ - -d /nonexistent -s /sbin/nologin -c "Simscan User" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi - fi |