<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>This is a patch for ticket 2575 on trac: [RFE] Installer wizard should prompt for DNS.  This is my first time submitting a patch so I was looking for something that seemed relatively easy…</div><div><br></div><div>Thanks,</div><div>Brian</div><div><br></div><div><br></div><div>diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install</div><div>index 1559107..d8c4ae5 100755</div><div>--- a/install/tools/ipa-server-install</div><div>+++ b/install/tools/ipa-server-install</div><div>@@ -564,6 +564,7 @@ def main():</div><div>     global pw_name</div><div>     global uninstalling</div><div>     global installation_cleanup</div><div>+    </div><div>     ds = None</div><div> </div><div>     safe_options, options = parse_options()</div><div>@@ -740,8 +741,18 @@ def main():</div><div>     admin_password = ""</div><div>     reverse_zone = None</div><div> </div><div>-    # check bind packages are installed</div><div>+    # Setup a variable to use instead of options.setup_dns to enable interactive DNS selection</div><div>+    setup_dns=False</div><div>     if options.setup_dns:</div><div>+        setup_dns=True</div><div>+    </div><div>+    # Ask user if they want to install DNS    </div><div>+    if ipautil.user_input("Do you want to cnfigure integrated DNS (bind)?", false):</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>setup_dns=True</div><div>+</div><div>+</div><div>+    # check bind packages are installed</div><div>+    if setup_dns:</div><div>         if not bindinstance.check_inst(options.unattended):</div><div>             sys.exit("Aborting installation")</div><div> </div><div>@@ -827,7 +838,7 @@ def main():</div><div>     else:</div><div>         admin_password = options.admin_password</div><div> </div><div>-    if options.setup_dns:</div><div>+    if setup_dns:</div><div>         if <a href="http://options.no">options.no</a>_forwarders:</div><div>             dns_forwarders = ()</div><div>         elif options.forwarders:</div><div>@@ -858,7 +869,7 @@ def main():</div><div>     print "Realm name:    %s" % realm_name</div><div>     print</div><div> </div><div>-    if options.setup_dns:</div><div>+    if setup_dns:</div><div>         print "BIND DNS server will be configured to serve IPA domain with:"</div><div>         print "Forwarders:    %s" % ("No forwarders" if not dns_forwarders \</div><div>                 else ", ".join([str(ip) for ip in dns_forwarders]))</div><div>@@ -1102,7 +1113,7 @@ def main():</div><div>                persistent_search=options.persistent_search,</div><div>                serial_autoincrement=options.serial_autoincrement,</div><div>                ca_configured=not options.selfsign)</div><div>-    if options.setup_dns:</div><div>+    if setup_dns:</div><div>         api.Backend.ldap2.connect(bind_dn=DN(('cn', 'Directory Manager')), bind_pw=dm_password)</div><div> </div><div>         bind.create_instance()</div><div>@@ -1147,11 +1158,11 @@ def main():</div><div>     print "\t\t  * 80, 443: HTTP/HTTPS"</div><div>     print "\t\t  * 389, 636: LDAP/LDAPS"</div><div>     print "\t\t  * 88, 464: kerberos"</div><div>-    if options.setup_dns:</div><div>+    if setup_dns:</div><div>         print "\t\t  * 53: bind"</div><div>     print "\t\tUDP Ports:"</div><div>     print "\t\t  * 88, 464: kerberos"</div><div>-    if options.setup_dns:</div><div>+    if setup_dns:</div><div>         print "\t\t  * 53: bind"</div><div>     if options.conf_ntp:</div><div>         print "\t\t  * 123: ntp"</div><br><br><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br></div></span>
</div>
<br></body></html>