diff options
author | adam <adam@pkgsrc.org> | 2011-01-10 14:50:56 +0000 |
---|---|---|
committer | adam <adam@pkgsrc.org> | 2011-01-10 14:50:56 +0000 |
commit | 972ddedb563186150fd4d8def6ef21faafeeb987 (patch) | |
tree | 036ccd664eced98e1e46ed648eee067f2780c915 /databases/postgresql84-server | |
parent | 46f0810c6edf9517525d472fbbc451844f63c9bf (diff) | |
download | pkgsrc-972ddedb563186150fd4d8def6ef21faafeeb987.tar.gz |
For PostgreSQL before 9.0, pg_ctl doesn't know 'init'; revert to initdb.
Diffstat (limited to 'databases/postgresql84-server')
-rw-r--r-- | databases/postgresql84-server/files/pgsql.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/databases/postgresql84-server/files/pgsql.sh b/databases/postgresql84-server/files/pgsql.sh index bec0ba1eb67..086721568c5 100644 --- a/databases/postgresql84-server/files/pgsql.sh +++ b/databases/postgresql84-server/files/pgsql.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: pgsql.sh,v 1.2 2010/12/19 09:53:43 adam Exp $ +# $NetBSD: pgsql.sh,v 1.3 2011/01/10 14:50:56 adam Exp $ # # PostgreSQL database rc.d control script # @@ -60,6 +60,8 @@ pgsql_precmd() pgsql_initdb() { + initdb="@PG_PREFIX@/bin/initdb" + if [ -d ${pgsql_home}/data/base ]; then @ECHO@ "The PostgreSQL template databases have already been initialized." @ECHO@ "Skipping database initialization." @@ -69,7 +71,7 @@ pgsql_initdb() @CHOWN@ ${pgsql_user} ${pgsql_home} @CHGRP@ ${pgsql_group} ${pgsql_home} @CHMOD@ 0700 ${pgsql_home} - doit="@SU@ -m ${pgsql_user} -c '${command} init ${command_args}'" + doit="@SU@ -m ${pgsql_user} -c '${initdb} -D ${pgsql_home}/data'" eval $doit fi } |