From 2afa824ca873539815ad602a77b1da4890f13a55 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 12 Sep 2011 06:14:31 +0000 Subject: main/postgresql: update pre-upgrade script --- main/postgresql/APKBUILD | 2 +- main/postgresql/postgresql.pre-upgrade | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'main/postgresql') diff --git a/main/postgresql/APKBUILD b/main/postgresql/APKBUILD index f90ae1a24..5bb39415e 100644 --- a/main/postgresql/APKBUILD +++ b/main/postgresql/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa pkgname=postgresql pkgver=9.1.0 -pkgrel=0 +pkgrel=1 pkgdesc="A sophisticated object-relational DBMS" url="http://www.postgresql.org/" arch="all" diff --git a/main/postgresql/postgresql.pre-upgrade b/main/postgresql/postgresql.pre-upgrade index 989e02167..bcdedaac8 100644 --- a/main/postgresql/postgresql.pre-upgrade +++ b/main/postgresql/postgresql.pre-upgrade @@ -1,11 +1,12 @@ #!/bin/sh - new="$1" old="$2" -compare=$(apk version -t "$old" 8.4) -# check if we upgrade from earlier than 8.4 and if it is running +pgver=${new%*.} +compare=$(apk version -t "$old" $pgver) + +# check if we upgrade from earlier than $pgver and if it is running if [ "$compare" != "<" ] || ! /etc/init.d/postgresql --quiet status; then exit 0 fi @@ -15,8 +16,8 @@ if [ -f /etc/conf.d/postgresql ]; then fi cat <