#!/bin/sh set -e # Previous Ganeti versions will refuse to upgrade to 3.0 using `gnt-cluster # upgrade`. As gnt-cluster upgrade uses the "old" code (i.e. that of the # previous version), the only way to facilitate upgrades is to divert 2.16's # version-checking code and replace it with code that allows upgrades. if [ "$1" = "install" ]; then dpkg-divert --add --rename --package ganeti-3.1 \ --divert /usr/share/ganeti/2.16/ganeti/utils/version.py.orig \ /usr/share/ganeti/2.16/ganeti/utils/version.py fi # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts.