diff options
author | grant <grant@pkgsrc.org> | 2003-10-11 07:05:19 +0000 |
---|---|---|
committer | grant <grant@pkgsrc.org> | 2003-10-11 07:05:19 +0000 |
commit | 1d9c32af2d8b6ca07eaf9b3e8d0759cb9b3b7989 (patch) | |
tree | 919c75e792c257e9ad88103d825af394cce69c86 /databases/postgresql-server | |
parent | 1e6dc66ad08858edb10cfe840e4755439301b1b5 (diff) | |
download | pkgsrc-1d9c32af2d8b6ca07eaf9b3e8d0759cb9b3b7989.tar.gz |
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.
Diffstat (limited to 'databases/postgresql-server')
-rw-r--r-- | databases/postgresql-server/files/pgsql.sh | 6 |
1 files changed, 3 insertions, 3 deletions
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 |