From d51a2b68652ac174b7e1f2b5540530f1eac8e1fe Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Sun, 24 Feb 2019 18:47:26 -0800 Subject: [PATCH] bind: Handle conffile prompt during upgrade - Simply keep the old configuration as the configuration format for bind is unlikely to change due to its stability. Future versions may consider checking for version of package being upgraded to. - Don't start service if not already running. - Don't perform firewall changes. - No need to rerun setup as old configuration is being kept. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/bind/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plinth/modules/bind/__init__.py b/plinth/modules/bind/__init__.py index 77d162dd3..b29b76839 100644 --- a/plinth/modules/bind/__init__.py +++ b/plinth/modules/bind/__init__.py @@ -104,6 +104,11 @@ def setup(helper, old_version=None): helper.call('post', actions.superuser_run, 'bind', ['setup']) +def force_upgrade(helper): + """Force upgrade the managed packages to resolve conffile prompt.""" + helper.install(managed_packages, force_configuration='old') + + def enable(): """Enable the module.""" actions.superuser_run('service', ['enable', managed_services[0]])