aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-09-12 07:02:26 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-09-12 07:02:26 +0000
commitb3eb89b6f60f544a97f77b97cfe54c3da4a55ab9 (patch)
tree3a4849dda054b0432472a2263733bd821d3fb928
parentc173bef7a69f03f1fdf97405620c010f0d1a30ce (diff)
downloadaports-b3eb89b6f60f544a97f77b97cfe54c3da4a55ab9.tar.bz2
aports-b3eb89b6f60f544a97f77b97cfe54c3da4a55ab9.tar.xz
main/postgresql: check that PGDATA is correct
for future upgrades
-rw-r--r--main/postgresql/APKBUILD8
1 files changed, 8 insertions, 0 deletions
diff --git a/main/postgresql/APKBUILD b/main/postgresql/APKBUILD
index 626dd82879..1a53ae658e 100644
--- a/main/postgresql/APKBUILD
+++ b/main/postgresql/APKBUILD
@@ -27,6 +27,14 @@ prepare() {
msg $i
patch -p1 -i "$srcdir"/$i || return 1
done
+ # sanity check of conf.d
+ (
+ . "$srcdir"/postgresql.confd
+ _datadir=/var/lib/postgresql/${pkgver%.*}/data
+ if [ "$_datadir" != "$PGDATA" ]; then
+ die "PGDATA is $PGDATA while $_datadir is expected"
+ fi
+ ) || return 1
}
build() {