diff options
author | Palle Girgensohn <girgen@FreeBSD.org> | 2008-01-22 14:08:48 +0000 |
---|---|---|
committer | Palle Girgensohn <girgen@FreeBSD.org> | 2008-01-22 14:08:48 +0000 |
commit | 98f3f95bd88cb1d4def552219e35943d960340bd (patch) | |
tree | 4582ca63baa64c3a1c7ad1e7a22f2440958f7ca0 /databases/postgresql92-server/pkg-install-server | |
parent | 30f33a9af3315ea5c3aaacd3bf7076862d993050 (diff) | |
download | ports-98f3f95bd88cb1d4def552219e35943d960340bd.tar.gz ports-98f3f95bd88cb1d4def552219e35943d960340bd.zip |
Notes
Diffstat (limited to 'databases/postgresql92-server/pkg-install-server')
-rw-r--r-- | databases/postgresql92-server/pkg-install-server | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/databases/postgresql92-server/pkg-install-server b/databases/postgresql92-server/pkg-install-server index 5abfa7862f64..8b6fcae11791 100644 --- a/databases/postgresql92-server/pkg-install-server +++ b/databases/postgresql92-server/pkg-install-server @@ -3,7 +3,6 @@ # $FreeBSD$ PATH=/bin:/usr/bin:/usr/sbin -DB_DIR=${PKG_PREFIX}/${PGUSER} backupwarning() { echo " @@ -25,31 +24,32 @@ backupwarning() { echo " case $2 in PRE-INSTALL) backupwarning - USER=${PGUSER} - GROUP=${PGGROUP} + PGUSER=${PGUSER:-pgsql} + PGGROUP=${PGGROUP:-pgsql} + DB_DIR=${PKG_PREFIX}/${PGUSER} UID=70 GID=70 - if pw group show "${GROUP}" 2>/dev/null; then - echo "You already have a group \"${GROUP}\", so I will use it." + 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 ${GROUP} -g ${GID}; then - echo "Added group \"${GROUP}\"." + if pw groupadd ${PGGROUP} -g ${GID}; then + echo "Added group \"${PGGROUP}\"." else - echo "Adding group \"${GROUP}\" failed..." + echo "Adding group \"${PGGROUP}\" 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." + 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 ${USER} -u ${UID} -g ${GROUP} -h - \ + if pw useradd ${PGUSER} -u ${UID} -g ${PGGROUP} -h - \ -d ${DB_DIR} -c "PostgreSQL Daemon" then - echo "Added user \"${USER}\"." + echo "Added user \"${PGUSER}\"." else - echo "Adding user \"${USER}\" failed..." + echo "Adding user \"${PGUSER}\" failed..." exit 1 fi fi |