From 935ecd989a15504ca1908fab8d581e04653bfca6 Mon Sep 17 00:00:00 2001 From: grant Date: Sat, 11 Oct 2003 07:05:19 +0000 Subject: only test for existance of data directory, rather than the template databases to determine whether the dbdir has been initialised. fixes PR pkg/21133 from Thomas T. Thai. --- databases/postgresql-server/files/pgsql.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'databases') diff --git a/databases/postgresql-server/files/pgsql.sh b/databases/postgresql-server/files/pgsql.sh index 269b0aaf367..a8732e1836e 100644 --- a/databases/postgresql-server/files/pgsql.sh +++ b/databases/postgresql-server/files/pgsql.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: pgsql.sh,v 1.19 2003/07/16 10:35:15 abs Exp $ +# $NetBSD: pgsql.sh,v 1.20 2003/10/11 07:05:19 grant Exp $ # # PostgreSQL database rc.d control script # @@ -54,7 +54,7 @@ stop_cmd="pgsql_doit stop" pgsql_precmd() { - if [ ! -f ${pgsql_home}/data/base/1/PG_VERSION ]; then + if [ ! -d ${pgsql_home}/data/base ]; then pgsql_initdb fi } @@ -66,7 +66,7 @@ pgsql_initdb() if [ ! -x ${initdb} ]; then return 1 fi - if [ -f ${pgsql_home}/data/base/1/PG_VERSION ]; then + if [ -d ${pgsql_home}/data/base ]; then @ECHO@ "The PostgreSQL template databases have already been initialized." @ECHO@ "Skipping database initialization." else -- cgit v1.2.3