Add confirmation to preinstallation to warn about data loss

Refs #415
This commit is contained in:
Kienan Stewart 2020-10-14 17:47:07 -04:00 committed by Camille Lafitte
parent ec143dda02
commit 451ed4c369
2 changed files with 18 additions and 1 deletions

View File

@ -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)

View File

@ -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.