We no longer use the running state when uninstalling DS instances but we need to pull it in case it is there in an upgraded instance.

rob
>From 2862b1d40e688c931c6d7ac2b4fcdfc5defaca0e Mon Sep 17 00:00:00 2001
From: Rob Crittenden <rcrit...@redhat.com>
Date: Mon, 16 Apr 2012 17:03:46 -0400
Subject: [PATCH] Remove the running state when uninstalling DS instances.

We don't need to do anything with the state but if it exists in
the sysrestore index at the end of uninstallation the uninstaller will
complain about it.

https://fedorahosted.org/freeipa/ticket/2637
---
 ipaserver/install/cainstance.py |    3 +++
 ipaserver/install/dsinstance.py |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py
index 64175e48234311ce845805fc4f4dafcabf58018f..56b84fcd8f628685ddb5cdc813fcfc3d365be2a6 100644
--- a/ipaserver/install/cainstance.py
+++ b/ipaserver/install/cainstance.py
@@ -385,6 +385,9 @@ class CADSInstance(service.Service):
         enabled = self.restore_state("enabled")
         serverid = self.restore_state("serverid")
 
+        # Just eat this state if it exists
+        running = self.restore_state("running")
+
         if not enabled is None and not enabled:
             ipaservices.knownservices.dirsrv.disable()
 
diff --git a/ipaserver/install/dsinstance.py b/ipaserver/install/dsinstance.py
index 5a92bf978fbe3243ea47e7f49845b1d77a915487..adeecfc00e7bf2f1c659c21cba9745d37abe964a 100644
--- a/ipaserver/install/dsinstance.py
+++ b/ipaserver/install/dsinstance.py
@@ -624,6 +624,9 @@ class DsInstance(service.Service):
 
         enabled = self.restore_state("enabled")
 
+        # Just eat this state if it exists
+        running = self.restore_state("running")
+
         try:
             self.fstore.restore_file("/etc/security/limits.conf")
             self.fstore.restore_file("/etc/sysconfig/dirsrv")
-- 
1.7.7.6

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to