diff options
author | Chris Rees <crees@FreeBSD.org> | 2011-08-12 09:49:41 +0000 |
---|---|---|
committer | Chris Rees <crees@FreeBSD.org> | 2011-08-12 09:49:41 +0000 |
commit | c81f7cc2afdeb05dd0ae867e9c957ec389fed064 (patch) | |
tree | 2c7d67efce4fdc420e62e5339b61cdf49ae457f7 /databases/postgresql83-server | |
parent | 51522d2bdc2382cc55e58d3dc51a6c0fed876737 (diff) | |
download | ports-c81f7cc2afdeb05dd0ae867e9c957ec389fed064.tar.gz ports-c81f7cc2afdeb05dd0ae867e9c957ec389fed064.zip |
Notes
Diffstat (limited to 'databases/postgresql83-server')
-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 99e01933a334..e034cd0dcd84 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 6dc3b6fdbd67..e3be291efdc1 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 ;; |