summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorgrant <grant>2003-10-11 07:05:19 +0000
committergrant <grant>2003-10-11 07:05:19 +0000
commite03830177a19a2830490a17e8eef1f99fc631a53 (patch)
tree919c75e792c257e9ad88103d825af394cce69c86 /databases
parentd39dae304cf7b1ad2654d76d8152d1b10f5854f4 (diff)
downloadpkgsrc-e03830177a19a2830490a17e8eef1f99fc631a53.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')
-rw-r--r--databases/postgresql-server/files/pgsql.sh6
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