diff options
author | Mark McLoughlin <markmc@redhat.com> | 2008-02-21 15:23:29 +0000 |
---|---|---|
committer | Mark McLoughlin <markmc@redhat.com> | 2008-02-21 15:23:29 +0000 |
commit | 6e6237e54a1f7a07478ec7c592ea08f71e1b18ce (patch) | |
tree | 8fc451c804824f9776461c33ae95e1a72293cecd | |
parent | d01da9a5669e2a4ea01015a42c254b0c724e8675 (diff) | |
download | freeipa.git-6e6237e54a1f7a07478ec7c592ea08f71e1b18ce.tar.gz freeipa.git-6e6237e54a1f7a07478ec7c592ea08f71e1b18ce.tar.xz freeipa.git-6e6237e54a1f7a07478ec7c592ea08f71e1b18ce.zip |
Fix host_name buglet in ipa-server-install
This patch fixes a couple of buglets with read_ip_address():
1) It writes host_name to /etc/hosts, but isn't currently
being passed host_name
2) It doesn't return the IP address even though the caller
expects it
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
-rw-r--r-- | ipa-server/ipa-install/ipa-server-install | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ipa-server/ipa-install/ipa-server-install b/ipa-server/ipa-install/ipa-server-install index 8f111d21..5a2642db 100644 --- a/ipa-server/ipa-install/ipa-server-install +++ b/ipa-server/ipa-install/ipa-server-install @@ -228,9 +228,8 @@ def verify_ip_address(ip): is_ok = False return is_ok -def read_ip_address(): - askip = True - while askip: +def read_ip_address(host_name): + while True: ip = raw_input("Please provide the IP address to be used for this host name: ") if ip == "": @@ -247,7 +246,8 @@ def read_ip_address(): hosts_fd.seek(0, 2) hosts_fd.write(ip+'\t'+host_name+' '+host_name[:host_name.find('.')]+'\n') hosts_fd.close() - askip = False + + return ip def port_available(port): """Try to bind to a port on the wildcard host @@ -470,7 +470,7 @@ def main(): return "-Fatal Error-" if not ip: - ip = read_ip_address () + ip = read_ip_address(host_name) ip_address = ip print "The IPA Master Server will be configured with" |