summaryrefslogtreecommitdiffstats
path: root/install/tools/ipactl
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2012-12-04 13:55:30 -0500
committerRob Crittenden <rcritten@redhat.com>2012-12-05 10:44:44 -0500
commit62e7053a12fdfc38ac7ed212529c716428c7d92b (patch)
tree0ebed19d971804583bc567c31b6fc655259f19df /install/tools/ipactl
parent146da1b3269659cc92a444f85608820e044f8796 (diff)
downloadfreeipa-62e7053a12fdfc38ac7ed212529c716428c7d92b.tar.gz
freeipa-62e7053a12fdfc38ac7ed212529c716428c7d92b.tar.xz
freeipa-62e7053a12fdfc38ac7ed212529c716428c7d92b.zip
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
Diffstat (limited to 'install/tools/ipactl')
-rwxr-xr-xinstall/tools/ipactl10
1 files changed, 8 insertions, 2 deletions
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: