summaryrefslogtreecommitdiffstats
path: root/ipa-client/ipa-install/ipa-client-install
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2008-02-26 15:31:34 -0500
committerRob Crittenden <rcritten@redhat.com>2008-02-26 15:31:34 -0500
commit111a475b1527cf08d664070db20a7cd155ff7cea (patch)
treed790c3acdcfda5dfba7d31ff13db54bb33834b0f /ipa-client/ipa-install/ipa-client-install
parent8f0d4a8ed3cd80ee1c68d3f17e777fa89bcc105a (diff)
downloadfreeipa-111a475b1527cf08d664070db20a7cd155ff7cea.tar.gz
freeipa-111a475b1527cf08d664070db20a7cd155ff7cea.tar.xz
freeipa-111a475b1527cf08d664070db20a7cd155ff7cea.zip
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
Diffstat (limited to 'ipa-client/ipa-install/ipa-client-install')
-rw-r--r--ipa-client/ipa-install/ipa-client-install21
1 files changed, 15 insertions, 6 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install
index 318994118..061b0f7eb 100644
--- a/ipa-client/ipa-install/ipa-client-install
+++ b/ipa-client/ipa-install/ipa-client-install
@@ -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)