mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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
This commit is contained in:
@@ -412,6 +412,11 @@ def force_sync(realm, thishost, fromhost, dirman_passwd):
|
||||
repl.force_sync(repl.conn, thishost)
|
||||
|
||||
def main():
|
||||
if os.getegid() == 0:
|
||||
installutils.check_server_configuration()
|
||||
elif not os.path.exists('/etc/ipa/default.conf'):
|
||||
sys.exit("IPA is not configured on this system.")
|
||||
|
||||
options, args = parse_options()
|
||||
|
||||
# Just initialize the environment. This is so the installer can have
|
||||
@@ -480,6 +485,8 @@ except KeyboardInterrupt:
|
||||
sys.exit(1)
|
||||
except SystemExit, e:
|
||||
sys.exit(e)
|
||||
except RuntimeError, e:
|
||||
sys.exit(e)
|
||||
except ldap.INVALID_CREDENTIALS:
|
||||
print "Invalid password"
|
||||
sys.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user