main/postgresql: check if data directory is empty on setup

This commit is contained in:
Natanael Copa 2009-09-24 15:02:28 +00:00
parent 4e336ad781
commit 2201bb19f8
2 changed files with 3 additions and 2 deletions

View File

@ -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"

View File

@ -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