From 26c1851e98f31f11cf52b36bcb7e399ccbb2af17 Mon Sep 17 00:00:00 2001 From: Gabe Date: Tue, 28 Apr 2015 07:34:07 -0600 Subject: Remove unneeded ip-address option in ipa-adtrust-install https://fedorahosted.org/freeipa/ticket/4575 Reviewed-By: Martin Basti --- install/tools/ipa-adtrust-install | 36 +-------------------------------- install/tools/man/ipa-adtrust-install.1 | 3 --- ipaserver/install/adtrustinstance.py | 4 +--- 3 files changed, 2 insertions(+), 41 deletions(-) diff --git a/install/tools/ipa-adtrust-install b/install/tools/ipa-adtrust-install index ac1d13a13..a4124078f 100755 --- a/install/tools/ipa-adtrust-install +++ b/install/tools/ipa-adtrust-install @@ -39,8 +39,6 @@ def parse_options(): parser = IPAOptionParser(version=version.VERSION) parser.add_option("-d", "--debug", dest="debug", action="store_true", default=False, help="print debugging information") - parser.add_option("--ip-address", dest="ip_address", - type="ip", ip_local=True, help="Master Server IP Address") parser.add_option("--netbios-name", dest="netbios_name", help="NetBIOS name of the IPA domain") parser.add_option("--no-msdcs", dest="no_msdcs", action="store_true", @@ -290,38 +288,6 @@ def main(): if not options.unattended and not options.enable_compat: options.enable_compat = enable_compat_tree() - # Check we have a public IP that is associated with the hostname - ip = None - try: - hostaddr = resolve_host(api.env.host) - if len(hostaddr) > 1: - print >> sys.stderr, "The server hostname resolves to more than one address:" - for addr in hostaddr: - print >> sys.stderr, " %s" % addr - - if options.ip_address: - if str(options.ip_address) not in hostaddr: - print >> sys.stderr, "Address passed in --ip-address did not match any resolved" - print >> sys.stderr, "address!" - sys.exit(1) - print "Selected IP address:", str(options.ip_address) - ip = options.ip_address - else: - if options.unattended: - print >> sys.stderr, "Please use --ip-address option to specify the address" - sys.exit(1) - else: - ip = read_ip_address(api.env.host, fstore) - else: - ip = hostaddr and ipautil.CheckedIPAddress(hostaddr[0], match_local=True) - except Exception, e: - print "Error: Invalid IP Address %s: %s" % (ip, e) - print "Aborting installation" - sys.exit(1) - - ip_address = str(ip) - root_logger.debug("will use ip_address: %s\n", ip_address) - admin_password = options.admin_password if not (options.unattended or admin_password): admin_password = read_admin_password(options.admin_name) @@ -406,7 +372,7 @@ def main(): smb = adtrustinstance.ADTRUSTInstance(fstore) smb.realm = api.env.realm smb.autobind = ipaldap.AUTOBIND_ENABLED - smb.setup(api.env.host, ip_address, api.env.realm, api.env.domain, + smb.setup(api.env.host, api.env.realm, api.env.domain, netbios_name, reset_netbios_name, options.rid_base, options.secondary_rid_base, options.no_msdcs, options.add_sids, diff --git a/install/tools/man/ipa-adtrust-install.1 b/install/tools/man/ipa-adtrust-install.1 index b0aa8ceef..a32eefb0e 100644 --- a/install/tools/man/ipa-adtrust-install.1 +++ b/install/tools/man/ipa-adtrust-install.1 @@ -41,9 +41,6 @@ might be affected as well. \fB\-d\fR, \fB\-\-debug\fR Enable debug logging when more verbose output is needed .TP -\fB\-\-ip\-address\fR=\fIIP_ADDRESS\fR -The IP address of the IPA server. If not provided then this is determined based on the hostname of the server. -.TP \fB\-\-netbios\-name\fR=\fINETBIOS_NAME\fR The NetBIOS name for the IPA domain. If not provided then this is determined based on the leading component of the DNS domain name. Running diff --git a/ipaserver/install/adtrustinstance.py b/ipaserver/install/adtrustinstance.py index b4d644fdb..92c05f26a 100644 --- a/ipaserver/install/adtrustinstance.py +++ b/ipaserver/install/adtrustinstance.py @@ -108,7 +108,6 @@ class ADTRUSTInstance(service.Service): FALLBACK_GROUP_NAME = u'Default SMB Group' def __init__(self, fstore=None): - self.ip_address = None self.netbios_name = None self.reset_netbios_name = None self.no_msdcs = None @@ -774,11 +773,10 @@ class ADTRUSTInstance(service.Service): LDAPI_SOCKET = self.ldapi_socket, FQDN = self.fqdn) - def setup(self, fqdn, ip_address, realm_name, domain_name, netbios_name, + def setup(self, fqdn, realm_name, domain_name, netbios_name, reset_netbios_name, rid_base, secondary_rid_base, no_msdcs=False, add_sids=False, smbd_user="samba", enable_compat=False): self.fqdn = fqdn - self.ip_address = ip_address self.realm = realm_name self.domain_name = domain_name self.netbios_name = netbios_name -- cgit