diff options
author | crees <crees@FreeBSD.org> | 2011-08-12 17:49:41 +0800 |
---|---|---|
committer | crees <crees@FreeBSD.org> | 2011-08-12 17:49:41 +0800 |
commit | c8e2b2b1f74316da7103c7a4f73c2bc893a4c5e5 (patch) | |
tree | 9e72f2aedab5955f8dfa9c44db269e3e049d47f4 /databases | |
parent | 2b0495e082dc2bb0fd9a4046aaae0fafe2d80f42 (diff) | |
download | freebsd-ports-graphics-c8e2b2b1f74316da7103c7a4f73c2bc893a4c5e5.tar.gz freebsd-ports-graphics-c8e2b2b1f74316da7103c7a4f73c2bc893a4c5e5.tar.zst freebsd-ports-graphics-c8e2b2b1f74316da7103c7a4f73c2bc893a4c5e5.zip |
- Use USERS and GROUPS
PR: ports/157588
Submitted by: me
Approved by: maintainer timeout (girgen, 9 weeks)
Diffstat (limited to 'databases')
-rw-r--r-- | databases/postgresql83-server/Makefile | 8 | ||||
-rw-r--r-- | databases/postgresql83-server/pkg-install-server | 37 |
2 files changed, 2 insertions, 43 deletions
diff --git a/databases/postgresql83-server/Makefile b/databases/postgresql83-server/Makefile index 99e01933a33..e034cd0dcd8 100644 --- a/databases/postgresql83-server/Makefile +++ b/databases/postgresql83-server/Makefile @@ -61,6 +61,8 @@ SERVER_ONLY= yes USE_RC_SUBR= postgresql USE_PGSQL= yes WANT_PGSQL_VER= ${PORTVERSION:C/([0-9][0-9]*)\.([0-9][0-9]*).*/\1\2/g} +USERS= ${PGUSER} +GROUPS= ${PGGROUP} .endif .if !defined(SLAVE_ONLY) @@ -273,12 +275,6 @@ PKGMESSAGE= ${WRKSRC}/pkg-message${PKGNAMESUFFIX} . endif .endif -.if defined(SERVER_ONLY) -pre-su-install: - @ ${SETENV} PKG_PREFIX=${PREFIX} PGUSER=${PGUSER} PGGROUP=${PGGROUP} \ - ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL -.endif - .if !defined(NO_BUILD) post-patch: @${REINPLACE_CMD} s/@PTHREAD_LIBS@// ${WRKSRC}/src/Makefile.global.in diff --git a/databases/postgresql83-server/pkg-install-server b/databases/postgresql83-server/pkg-install-server index 6dc3b6fdbd6..e3be291efdc 100644 --- a/databases/postgresql83-server/pkg-install-server +++ b/databases/postgresql83-server/pkg-install-server @@ -20,43 +20,6 @@ backupwarning() { echo " } case $2 in -PRE-INSTALL) - backupwarning - PGUSER=${PGUSER:-pgsql} - PGGROUP=${PGGROUP:-pgsql} - DB_DIR=${PKG_PREFIX}/${PGUSER} - UID=70 - GID=70 - - if pw group show "${PGGROUP}" 2>/dev/null; then - echo "You already have a group \"${PGGROUP}\", so I will use it." - else - if pw groupadd ${PGGROUP} -g ${GID}; then - echo "Added group \"${PGGROUP}\"." - else - echo "Adding group \"${PGGROUP}\" failed..." - exit 1 - fi - fi - - if pw user show "${PGUSER}" 2>/dev/null; then - echo "You already have a user \"${PGUSER}\", so I will use it." - else - if pw useradd ${PGUSER} -u ${UID} -g ${PGGROUP} -h - \ - -d ${DB_DIR} -c "PostgreSQL Daemon" - then - echo "Added user \"${PGUSER}\"." - else - echo "Adding user \"${PGUSER}\" failed..." - exit 1 - fi - fi - - if ! [ -x ~${PGUSER} ] ; then - install -m 755 -o ${PGUSER} -g ${PGGROUP} -d ${DB_DIR} - fi - ;; - BACKUPWARNING) backupwarning ;; |