summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/dnskeysyncinstance.py
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2015-02-09 16:18:28 +0100
committerMartin Kosek <mkosek@redhat.com>2015-02-18 10:05:45 +0100
commitb5e06b90c9113836eef5b04f0993097314d2be84 (patch)
treeb6351b948559bc0e183805e128625f71a673bff1 /ipaserver/install/dnskeysyncinstance.py
parentf499e506c86d076a57e74bcca587394c8036ed57 (diff)
downloadfreeipa-b5e06b90c9113836eef5b04f0993097314d2be84.tar.gz
freeipa-b5e06b90c9113836eef5b04f0993097314d2be84.tar.xz
freeipa-b5e06b90c9113836eef5b04f0993097314d2be84.zip
Uninstall configured services only
Fixes: dnskeysyncisntance - requires a stored state to be uninstalled bindinstance - uninstal service only if bind was configured by IPA Ticket:https://fedorahosted.org/freeipa/ticket/4869 Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipaserver/install/dnskeysyncinstance.py')
-rw-r--r--ipaserver/install/dnskeysyncinstance.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/ipaserver/install/dnskeysyncinstance.py b/ipaserver/install/dnskeysyncinstance.py
index 1396d01a7..090c87505 100644
--- a/ipaserver/install/dnskeysyncinstance.py
+++ b/ipaserver/install/dnskeysyncinstance.py
@@ -179,6 +179,9 @@ class DNSKeySyncInstance(service.Service):
):
raise RuntimeError("DNS container does not exist")
+ # ready to be installed, storing a state is required to run uninstall
+ self.backup_state("configured", True)
+
def __setup_dnssec_containers(self):
"""
Setup LDAP containers for DNSSEC
@@ -472,14 +475,13 @@ class DNSKeySyncInstance(service.Service):
def uninstall(self):
- if not self.is_configured():
- return
-
- self.print_msg("Unconfiguring %s" % self.service_name)
+ if self.is_configured():
+ self.print_msg("Unconfiguring %s" % self.service_name)
# Just eat states
self.restore_state("running")
self.restore_state("enabled")
+ self.restore_state("configured")
# stop and disable service (IPA service, we do not need it anymore)
self.stop()