aboutsummaryrefslogtreecommitdiffstats
path: root/main/postgresql
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-09-24 15:02:28 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-09-24 15:02:28 +0000
commit2201bb19f8db8978d3573f64eb67d5e0ef33bb4a (patch)
treedc5c7d1f1197b58711cd28635ba3a5655332328b /main/postgresql
parent4e336ad781863702aa75b66b6013e0f151e1f27b (diff)
downloadaports-2201bb19f8db8978d3573f64eb67d5e0ef33bb4a.tar.bz2
aports-2201bb19f8db8978d3573f64eb67d5e0ef33bb4a.tar.xz
main/postgresql: check if data directory is empty on setup
Diffstat (limited to 'main/postgresql')
-rw-r--r--main/postgresql/APKBUILD4
-rw-r--r--main/postgresql/postgresql.initd1
2 files changed, 3 insertions, 2 deletions
diff --git a/main/postgresql/APKBUILD b/main/postgresql/APKBUILD
index e773dc93f9..df92e4fa01 100644
--- a/main/postgresql/APKBUILD
+++ b/main/postgresql/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=postgresql
pkgver=8.4.1
-pkgrel=0
+pkgrel=1
pkgdesc="A sophisticated object-relational DBMS"
url="http://www.postgresql.org/"
license="BSD"
@@ -47,5 +47,5 @@ client() {
md5sums="f2015af17bacbbfe140daf0d1067f9c9 postgresql-8.4.1.tar.bz2
-e4b13053dcbebdf2e59450b94bc27705 postgresql.initd
+794aa5e0ee00e6939505aeff527550c2 postgresql.initd
6218755fde294b7d17b77d280a9c9106 postgresql.confd"
diff --git a/main/postgresql/postgresql.initd b/main/postgresql/postgresql.initd
index 48b95b3eae..e7941648c3 100644
--- a/main/postgresql/postgresql.initd
+++ b/main/postgresql/postgresql.initd
@@ -98,6 +98,7 @@ reload() {
setup() {
ebegin "Creating a new PostgreSQL database cluster"
+ rmdir "${PGDATA}" 2>/dev/null
if [ -d "${PGDATA}" ] ; then
eend 1 "${PGDATA} already exist"
return