summaryrefslogtreecommitdiffstats
path: root/main/postgresql/postgresql.pre-upgrade
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-09-12 06:14:31 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-09-12 06:14:31 +0000
commit2afa824ca873539815ad602a77b1da4890f13a55 (patch)
tree7017c9ca16eaa3e9dadbe854fb98fb840a64d2ac /main/postgresql/postgresql.pre-upgrade
parentd822dbef6a93b82f5d0e4e25b0abd2e8a18e53d0 (diff)
downloadaports-2afa824ca873539815ad602a77b1da4890f13a55.tar.bz2
aports-2afa824ca873539815ad602a77b1da4890f13a55.tar.xz
main/postgresql: update pre-upgrade script
Diffstat (limited to 'main/postgresql/postgresql.pre-upgrade')
-rw-r--r--main/postgresql/postgresql.pre-upgrade11
1 files changed, 6 insertions, 5 deletions
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 <<EOF
-* You are upgrading to postgres 8.4 wich is not compatible with the running
-* See: http://www.postgresql.org/docs/8.4/interactive/install-upgrading.html
+* You are upgrading to postgres $pgver wich is not compatible with the running
+* See: http://www.postgresql.org/docs/$pgver/static/upgrading.html
*
* The corresponding steps for Alpine Linux is:
*