Ensure that 'ipactl stop' stops the dirsrv instance, even when no other
services are running.
   
https://fedorahosted.org/freeipa/ticket/3574

-- 
Regards,

Ana Krivokapic
Associate Software Engineer
FreeIPA team
Red Hat Inc.

From 800c17eaf3a8c5e6a9e8af7c13fa8ecfe8088592 Mon Sep 17 00:00:00 2001
From: Ana Krivokapic <akriv...@redhat.com>
Date: Fri, 26 Apr 2013 14:46:17 +0200
Subject: [PATCH] Always stop dirsrv in 'ipactl stop'

Ensure that 'ipactl stop' stops the dirsrv instance, even when no other
services are running.

https://fedorahosted.org/freeipa/ticket/3574
---
 install/tools/ipactl | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/install/tools/ipactl b/install/tools/ipactl
index 6500c274c446155987a8aefde7265d4d5f7a732a..cab1127b7be2177f6bad0351a8f793f671891edf 100755
--- a/install/tools/ipactl
+++ b/install/tools/ipactl
@@ -252,7 +252,6 @@ def ipa_start(options):
 
 def ipa_stop(options):
     dirsrv = ipaservices.knownservices.dirsrv
-    svc_list = []
     try:
         svc_list = get_config_from_file()
     except Exception, e:
@@ -270,6 +269,12 @@ def ipa_stop(options):
             finally:
                 raise IpactlError()
 
+    try:
+        print "Stopping Directory Service"
+        dirsrv.stop(capture_output=False)
+    except:
+        raise IpactlError("Failed to stop Directory Service")
+
     if len(svc_list) == 0:
         # no service to stop
         return
@@ -282,12 +287,6 @@ def ipa_stop(options):
         except:
             emit_err("Failed to stop %s Service" % svc)
 
-    try:
-        print "Stopping Directory Service"
-        dirsrv.stop(capture_output=False)
-    except:
-        raise IpactlError("Failed to stop Directory Service")
-
     # remove file with list of started services
     os.unlink(ipaservices.SVC_LIST_FILE)
 
-- 
1.8.1.4

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

Reply via email to