mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Don't try to use options.realm_name unless it was passed in
Don't allow empty responses to domain and realm name Handle ctrl-C 434982
This commit is contained in:
parent
8f0d4a8ed3
commit
111a475b15
@ -101,7 +101,9 @@ def main():
|
||||
return ret
|
||||
else:
|
||||
print "Failed to determine your DNS domain (DNS misconfigured?)"
|
||||
dom = raw_input("Please provide your domain name (ex: example.com): ")
|
||||
dom = ""
|
||||
while dom == "":
|
||||
dom = raw_input("Please provide your domain name (ex: example.com): ")
|
||||
ret = ds.search(domain=dom)
|
||||
if ret == -2:
|
||||
dnsok = False
|
||||
@ -112,7 +114,8 @@ def main():
|
||||
return ret
|
||||
else:
|
||||
print "Failed to find the IPA Server (DNS misconfigured?)"
|
||||
srv = raw_input("Please provide your server name (ex: ipa.example.com): ")
|
||||
while srv == "":
|
||||
srv = raw_input("Please provide your server name (ex: ipa.example.com): ")
|
||||
ret = ds.search(domain=dom, server=srv)
|
||||
if ret != 0:
|
||||
print "Failed to verify that "+srv+" is an IPA Server, aborting!"
|
||||
@ -121,13 +124,16 @@ def main():
|
||||
if dnsok:
|
||||
print "Discovery was successful!"
|
||||
elif not options.unattended:
|
||||
print "\nThe failure to use DNS to find your IPA server indicates that your resolv.conf file is not properly configured.\n"
|
||||
print "\nThe failure to use DNS to find your IPA server indicates that your"
|
||||
print "resolv.conf file is not properly configured.\n"
|
||||
print "Autodiscovery of servers for failover cannot work with this configuration.\n"
|
||||
print "If you proceed with the installation, services will be configured to always access the discovered server for all operation and will not fail over to other servers in case of failure.\n"
|
||||
print "If you proceed with the installation, services will be configured to always"
|
||||
print "access the discovered server for all operation and will not fail over to"
|
||||
print "other servers in case of failure.\n"
|
||||
if not ask_for_confirmation("Do you want to proceed and configure the system with fixed values with no DNS discovery?"):
|
||||
return ret
|
||||
|
||||
if options.realm_name != ds.getRealmName():
|
||||
if options.realm_name and options.realm_name != ds.getRealmName():
|
||||
if not options.unattended:
|
||||
print "ERROR: The provided realm name: ["+options.realm_name+"] does not match with the discovered one: ["+ds.getRealmName()+"]\n"
|
||||
return -3
|
||||
@ -271,4 +277,7 @@ def main():
|
||||
|
||||
return 0
|
||||
|
||||
sys.exit(main())
|
||||
try:
|
||||
sys.exit(main())
|
||||
except KeyboardInterrupt:
|
||||
sys.exit(1)
|
||||
|
Loading…
Reference in New Issue
Block a user