diff options
-rw-r--r-- | databases/postgresql/Makefile | 4 | ||||
-rw-r--r-- | databases/postgresql/files/pgsql.sh.tmpl | 9 | ||||
-rw-r--r-- | databases/postgresql/pkg/DEINSTALL | 6 | ||||
-rw-r--r-- | databases/postgresql/pkg/INSTALL | 7 |
4 files changed, 14 insertions, 12 deletions
diff --git a/databases/postgresql/Makefile b/databases/postgresql/Makefile index 2394e765897..ca3309c84fd 100644 --- a/databases/postgresql/Makefile +++ b/databases/postgresql/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.54 2000/09/21 14:34:56 jlam Exp $ +# $NetBSD: Makefile,v 1.55 2000/12/07 16:56:39 jlam Exp $ # FreeBSD Id: Makefile,v 1.22 1997/12/24 01:21:37 alex Exp # @@ -53,11 +53,9 @@ pre-install: esac ${SED} -e 's|@PGUSER@|${PGUSER}|g' \ - -e 's|@PGHOME@|${PGHOME}|g' \ < ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} ${SED} -e 's|@PGUSER@|${PGUSER}|g' \ -e 's|@PGGROUP@|${PGGROUP}|g' \ - -e 's|@PGHOME@|${PGHOME}|g' \ -e 's|@USERDIR@|${USERDIR}|g' \ < ${PKGDIR}/INSTALL > ${INSTALL_FILE} PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL diff --git a/databases/postgresql/files/pgsql.sh.tmpl b/databases/postgresql/files/pgsql.sh.tmpl index 17d9a49fb66..dac496d6244 100644 --- a/databases/postgresql/files/pgsql.sh.tmpl +++ b/databases/postgresql/files/pgsql.sh.tmpl @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: pgsql.sh.tmpl,v 1.8 2000/09/21 14:34:56 jlam Exp $ +# $NetBSD: pgsql.sh.tmpl,v 1.9 2000/12/07 16:56:40 jlam Exp $ # FreeBSD Id: pgsql.sh.tmpl,v 1.3 1997/10/05 21:00:49 andreas Exp # # pgsql.sh - postgresql startup file for NetBSD @@ -10,6 +10,7 @@ CMD=${1:-start} USER=@PGUSER@ +PGHOME=@PREFIX@/${USER} if [ -x @PREFIX@/bin/postmaster -a -x @PREFIX@/bin/pg_ctl ] then @@ -18,15 +19,15 @@ then echo -n ' pgsql' su -l ${USER} -c 'exec @PREFIX@/bin/pg_ctl \ -p @PREFIX@/bin/postmaster -o "-S -o -F" start \ - > @PGHOME@/errlog' + > ${PGHOME}/errlog' ;; stop) su -l ${USER} -c 'exec @PREFIX@/bin/pg_ctl stop \ - >> @PGHOME@/errlog' + >> ${PGHOME}/errlog' ;; restart) su -l ${USER} -c 'exec @PREFIX@/bin/pg_ctl restart \ - >> @PGHOME@/errlog' + >> ${PGHOME}/errlog' ;; status) su -l ${USER} -c 'exec @PREFIX@/bin/pg_ctl status' diff --git a/databases/postgresql/pkg/DEINSTALL b/databases/postgresql/pkg/DEINSTALL index f8b759f4efc..8fa07fc6f2b 100644 --- a/databases/postgresql/pkg/DEINSTALL +++ b/databases/postgresql/pkg/DEINSTALL @@ -1,17 +1,18 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.2 2000/07/14 04:44:13 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.3 2000/12/07 16:56:41 jlam Exp $ # PKGNAME=$1 STAGE=$2 USER=@PGUSER@ -PGHOME=@PGHOME@ +PGHOME=${PKG_PREFIX}/${USER} case ${STAGE} in DEINSTALL) ;; + POST-DEINSTALL) cat << EOF =========================================================================== @@ -22,6 +23,7 @@ remove the \`${USER}' user and the following directories: =========================================================================== EOF ;; + *) echo "Unexpected argument: $2" exit 1 diff --git a/databases/postgresql/pkg/INSTALL b/databases/postgresql/pkg/INSTALL index 1dd01854948..9fccc75d701 100644 --- a/databases/postgresql/pkg/INSTALL +++ b/databases/postgresql/pkg/INSTALL @@ -1,14 +1,14 @@ #!/bin/sh # -# $NetBSD: INSTALL,v 1.1 2000/03/18 17:43:18 jlam Exp $ +# $NetBSD: INSTALL,v 1.2 2000/12/07 16:56:41 jlam Exp $ PKGNAME=$1 STAGE=$2 USER=@PGUSER@ GROUP=@PGGROUP@ -PGHOME=@PGHOME@ USERDIR=@USERDIR@ +PGHOME=${PKG_PREFIX}/${USER} case ${STAGE} in PRE-INSTALL) @@ -36,7 +36,7 @@ PRE-INSTALL) echo "Creating '${USER}' user..." ${USERDIR}/user add \ -c "PostgreSQL database administrator" \ - -d ${PGHOME} \ + -b ${PKG_PREFIX} \ -g ${GROUP} -s /bin/sh ${USER} echo "Done." else @@ -53,6 +53,7 @@ POST-INSTALL) echo ------------------------------------------------------------------ echo "${PKG_PREFIX}/bin/initdb --pglib=${PKG_PREFIX}/share/postgresql --pgdata=${PGHOME}/data" | su -l ${USER} ;; + *) echo "Unexpected argument: $2" exit 1 |