diff options
Diffstat (limited to 'databases')
-rw-r--r-- | databases/postgresql83-server/files/pgsql.sh | 6 | ||||
-rw-r--r-- | databases/postgresql84-server/files/pgsql.sh | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/databases/postgresql83-server/files/pgsql.sh b/databases/postgresql83-server/files/pgsql.sh index dfe2b4e1a0b..b92cba2160f 100644 --- a/databases/postgresql83-server/files/pgsql.sh +++ b/databases/postgresql83-server/files/pgsql.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: pgsql.sh,v 1.3 2010/12/19 09:53:54 adam Exp $ +# $NetBSD: pgsql.sh,v 1.4 2011/01/10 14:51:04 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 } 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 } |