diff --git a/debian/alternc.preinst b/debian/alternc.preinst index 6a57519d..2efee940 100644 --- a/debian/alternc.preinst +++ b/debian/alternc.preinst @@ -1,7 +1,6 @@ #!/bin/bash set -e - . /usr/share/debconf/confmodule # Create AlternC Panel user for web server @@ -64,6 +63,15 @@ case "$1" in echo "/etc/bind/master was not empty. Please remove it manually." fi + if dpkg --compare-versions "$2" lt "3.3.12"; then + db_input high alternc/confirm_unsupported_upgrade + db_go + db_get alternc/confirm_unsupported_upgrade + if [ "$RET" == "false" ] ; then + echo "User chose to abort installation" >&2 + exit 1 + fi + fi ;; abort-upgrade) diff --git a/debian/alternc.templates b/debian/alternc.templates index 53e45640..70b25594 100644 --- a/debian/alternc.templates +++ b/debian/alternc.templates @@ -264,3 +264,12 @@ _Description: Remote mysql: connection error . This is a fatal error and will cause the package installation to fail. + +Template: alternc/confirm_unsupported_upgrade +Type: boolean +_Description: This upgrade may incur data loss. Continue anyway? + When upgrading from AlternC < 3.3.12 to AlternC 3.5, sub domains + with SSL will be lost. It is recommended to upgrade to 3.3.12 + before upgrading to 3.5. + . + If you chose to not continue, this package installation will fail. \ No newline at end of file