diff options
Diffstat (limited to 'main/postgresql/postgresql.pre-upgrade')
-rw-r--r-- | main/postgresql/postgresql.pre-upgrade | 11 |
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: * |