From e3228467f3ed321d0e4ec2f74c2fc13635d224e8 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Thu, 7 May 2020 20:23:32 -0700 Subject: [PATCH] bind: Add daemon alias for bind9 -> named bind9 package version 1:9.16.1-2 in unstable renamed bind9.service to named.service. The new service file contains Alias=bind9.service. Use this support multiple versions of the package across Debian stable, testing and unstable. Closes: #1816. Tests performed: - Enable the service. 'service enable bind9' is called but fails with error ignored. 'service enable named' is also called but succeeds. Running 'service is-enable bind9' and 'service is-enabled named' return success. App page show enabled, there are no errors on the page. - When app is enabled, there is no message that service is not running. - When diagnostics are run, it shows that bind9 service is running. - Disable the app. 'service disable bind9' is called. Running 'service is-enable bind9' and 'service is-enabled named' return errors. App page shows disabled, there are no errors. - Repeat tests on Debian stable. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/bind/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plinth/modules/bind/__init__.py b/plinth/modules/bind/__init__.py index 850cbb353..e20979da1 100644 --- a/plinth/modules/bind/__init__.py +++ b/plinth/modules/bind/__init__.py @@ -21,7 +21,7 @@ from .manifest import backup # noqa, pylint: disable=unused-import version = 2 -managed_services = ['bind9'] +managed_services = ['bind9', 'named'] managed_packages = ['bind9'] @@ -97,7 +97,8 @@ class BindApp(app_module.App): 'daemon-bind', managed_services[0], listen_ports=[(53, 'tcp6'), (53, 'udp6'), (53, 'tcp4'), - (53, 'udp4')]) + (53, 'udp4')], + alias=managed_services[1]) self.add(daemon)