summaryrefslogtreecommitdiffstats
path: root/install/tools/ipa-ldap-updater
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2011-07-18 09:33:57 +0200
committerMartin Kosek <mkosek@redhat.com>2011-07-18 09:36:43 +0200
commit50a2c45760d51e7a13888702e1a047a113bc1f5e (patch)
tree26445179b4e7a072800072f78a1cf5cf1a5740e1 /install/tools/ipa-ldap-updater
parent5f0adc3fbe5b193a57b05eed70b9f59463d9d9da (diff)
downloadfreeipa-50a2c45760d51e7a13888702e1a047a113bc1f5e.tar.gz
freeipa-50a2c45760d51e7a13888702e1a047a113bc1f5e.tar.xz
freeipa-50a2c45760d51e7a13888702e1a047a113bc1f5e.zip
Check IPA configuration in install tools
Install tools may fail with unexpected error when IPA server is not installed on a system. Improve user experience by implementing a check to affected tools. https://fedorahosted.org/freeipa/ticket/1327 https://fedorahosted.org/freeipa/ticket/1347
Diffstat (limited to 'install/tools/ipa-ldap-updater')
-rwxr-xr-xinstall/tools/ipa-ldap-updater7
1 files changed, 2 insertions, 5 deletions
diff --git a/install/tools/ipa-ldap-updater b/install/tools/ipa-ldap-updater
index ec57109d3..5b63c120e 100755
--- a/install/tools/ipa-ldap-updater
+++ b/install/tools/ipa-ldap-updater
@@ -85,9 +85,7 @@ def main():
loglevel = logging.DEBUG
if os.getegid() == 0:
- fstore = sysrestore.FileStore('/var/lib/ipa/sysrestore')
- if not fstore.has_files():
- sys.exit("IPA is not configured on this system.")
+ installutils.check_server_configuration()
elif not os.path.exists('/etc/ipa/default.conf'):
sys.exit("IPA is not configured on this system.")
@@ -149,8 +147,7 @@ except BadSyntax, e:
print " %s" % e
sys.exit(1)
except RuntimeError, e:
- print "%s" % e
- sys.exit(1)
+ sys.exit(e)
except SystemExit, e:
sys.exit(e)
except KeyboardInterrupt, e: