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 <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2020-05-07 20:23:32 -07:00 committed by James Valleroy
parent 6d2f4b6cea
commit e3228467f3
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

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