From 62e7053a12fdfc38ac7ed212529c716428c7d92b Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Tue, 4 Dec 2012 13:55:30 -0500 Subject: Only update the list of running services in the installer or ipactl. The file is only present in the case of a server installation. It should only be touched by the server installer and ipactl. https://fedorahosted.org/freeipa/ticket/3277 --- install/tools/ipactl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'install/tools/ipactl') diff --git a/install/tools/ipactl b/install/tools/ipactl index e8f3f6384..c2f13c256 100755 --- a/install/tools/ipactl +++ b/install/tools/ipactl @@ -420,7 +420,10 @@ def ipa_status(options): try: svc_list = get_config_from_file() except IpactlError, e: - raise e + if os.path.exists(ipaservices.get_svc_list_file()): + raise e + else: + svc_list = [] except Exception, e: raise IpactlError("Failed to get list of services to probe status: " + str(e)) @@ -430,6 +433,9 @@ def ipa_status(options): print "Directory Service: RUNNING" else: print "Directory Service: STOPPED" + if len(svc_list) == 0: + print ("Directory Service must be running in order to " + + "obtain status of other services") except: raise IpactlError("Failed to get Directory Service status") @@ -473,7 +479,7 @@ def main(): else: raise e - api.bootstrap(context='cli', debug=options.debug) + api.bootstrap(context='ipactl', debug=options.debug) api.finalize() if '.' not in api.env.host: -- cgit