bindinstance: use data in named.conf to determine configuration status

Instead of checking sysrestore status which leads to incorrect
evaluation of DNS configuration status during 4.2 -> 4.4 upgrade, look
into named.conf to see whther it was already modified by IPA installer.

https://fedorahosted.org/freeipa/ticket/6503

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Martin Babinsky 2016-12-06 12:13:34 +01:00 committed by Martin Basti
parent 6d6fbc010e
commit f0e09c42b7

View File

@ -1144,6 +1144,13 @@ class BindInstance(service.Service):
self.api.Command.dnsconfig_show.output_for_cli(textui, result, None,
reverse=False)
def is_configured(self):
"""
Override the default logic querying StateFile for configuration status
and look whether named.conf was already modified by IPA installer.
"""
return named_conf_exists()
def uninstall(self):
if self.is_configured():
self.print_msg("Unconfiguring %s" % self.service_name)