diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 2001-10-19 11:26:37 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 2001-10-19 11:26:37 +0000 |
commit | 8c027b5c1d97540169ab4558a32c8fb259d4bf6c (patch) | |
tree | 80e629b1342dd55402b86ed0f23a814a0f790e43 /mail/popper | |
parent | New port py-mpz. This builds the mpz module (an interface to GMP) from (diff) |
Move user adding into pkg-install
Notes
Notes:
svn path=/head/; revision=48938
Diffstat (limited to 'mail/popper')
-rw-r--r-- | mail/popper/Makefile | 5 | ||||
-rw-r--r-- | mail/popper/pkg-install (renamed from mail/popper/scripts/pre-install) | 15 | ||||
-rw-r--r-- | mail/popper/pkg-req | 13 |
3 files changed, 15 insertions, 18 deletions
diff --git a/mail/popper/Makefile b/mail/popper/Makefile index 5267652d90a3..d6eb3ea1776f 100644 --- a/mail/popper/Makefile +++ b/mail/popper/Makefile @@ -7,7 +7,7 @@ PORTNAME= qpopper PORTVERSION= 2.53 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= mail MASTER_SITES= ftp://ftp.qualcomm.com/eudora/servers/unix/popper/old/ DISTNAME= ${PORTNAME}${PORTVERSION} @@ -54,6 +54,9 @@ post-patch: $(RM) ${WRKSRC}/md5.h $(CP) ${FILESDIR}/sendto.c ${WRKSRC} +pre-install: + PKG_PREFIX=${PREFIX} ./pkg-install ${PKGNAME} PRE-INSTALL + do-install: cd ${WRKSRC} && \ ${INSTALL_PROGRAM} -o pop -m 4111 popauth ${PREFIX}/bin diff --git a/mail/popper/scripts/pre-install b/mail/popper/pkg-install index 77e73a2b55b4..ef42d381b195 100644 --- a/mail/popper/scripts/pre-install +++ b/mail/popper/pkg-install @@ -1,10 +1,17 @@ #!/bin/sh +# $FreeBSD$ +# + +if [ "$2" != "PRE-INSTALL" ]; then + exit 0 +fi + USER=pop UID=68 GID=6 GROUP=mail -if ! pw group show "${GROUP}" 2>/dev/null 1>&2; then +if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then if pw groupadd ${GROUP} -g ${GID}; then echo "Added group \"${GROUP}\"." else @@ -13,7 +20,7 @@ if ! pw group show "${GROUP}" 2>/dev/null 1>&2; then fi fi -if ! pw user show "${USER}" 2>/dev/null 1>&2; then +if ! pw usershow "${USER}" 2>/dev/null 1>&2; then if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ -s "/sbin/nologin" -d "/nonexistent" -c "Post Office Owner" then @@ -24,9 +31,9 @@ if ! pw user show "${USER}" 2>/dev/null 1>&2; then fi fi -usrdir=${PREFIX}/etc/popper +usrdir=${PKG_PREFIX}/etc/popper if [ ! -d $usrdir ]; then mkdir -p $usrdir fi -chown pop:daemon $usrdir +chown ${USER}:daemon $usrdir chmod 700 $usrdir diff --git a/mail/popper/pkg-req b/mail/popper/pkg-req deleted file mode 100644 index 01bcc6374f10..000000000000 --- a/mail/popper/pkg-req +++ /dev/null @@ -1,13 +0,0 @@ -if [ "$2" != "INSTALL" ]; then - exit 0 -fi -if ! id -u pop > /dev/null 2>&1; then - echo "You need an account \"pop\" to install this package." - echo "Please add it by hand (try \"man vipw\") and try again." - echo "" - echo "An example passwd entry is:" - echo "pop:*:68:6::0:0:Post Office Owner:/nonexistent:/nonexistent" - echo "" - exit 1 -fi -exit 0 |