<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'>Thanks Martin and Dmitri.  I have attached a patch that I -think- is formatted correctly... I removed the new variable and added check for --unattended.<br><br><div><span name="x"></span><div>Thanks,</div><div><div>Brian </div><div><br></div></div><span name="x"></span><br></div><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Martin Kosek" <mkosek@redhat.com><br><b>To: </b>dpal@redhat.com<br><b>Cc: </b>freeipa-devel@redhat.com<br><b>Sent: </b>Wednesday, February 13, 2013 11:16:51 PM<br><b>Subject: </b>Re: [Freeipa-devel] patch for trac 2575<br><br>On 02/14/2013 03:49 AM, Dmitri Pal wrote:<br>> On 02/13/2013 05:20 PM, Brian Cook wrote:<br>>> Please disregard the first patch as it still asked the user if they want to install DNS even if --setup-dns was passed, this one is fixed.<br>>><br>>> Brian<br>> <br>> Brian,<br>> <br>> Thanks for the patch.<br>> Can you please format it following these guidelines:<br>> https://fedorahosted.org/freeipa/wiki/PatchFormat<br>> <br>> Thanks<br>> Dmitri<br><br>Hello Brian,<br><br>Thanks for the patch! Also few technical notes:<br><br>1) There is no need to invent the new variable, you can ask and set<br>options.setup_dns to True. We already to this in other parts incode<br><br>2) This patch would --unattended mode when no --setup-dns is passed<br><br>Martin<br><br>>><br>>><br>>><br>>> diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install<br>>> index 1559107..96ef802 100755<br>>> --- a/install/tools/ipa-server-install<br>>> +++ b/install/tools/ipa-server-install<br>>> @@ -564,6 +564,7 @@ def main():<br>>>      global pw_name<br>>>      global uninstalling<br>>>      global installation_cleanup<br>>> +    <br>>>      ds = None<br>>>  <br>>>      safe_options, options = parse_options()<br>>> @@ -740,8 +741,18 @@ def main():<br>>>      admin_password = ""<br>>>      reverse_zone = None<br>>>  <br>>> -    # check bind packages are installed<br>>> +    # Setup a variable to use instead of options.setup_dns to enable interactive DNS selection<br>>> +    setup_dns=False<br>>>      if options.setup_dns:<br>>> +        setup_dns=True<br>>> +    else:<br>>> +    # Ask user if they want to install DNS    <br>>> +        if ipautil.user_input("Do you want to configure integrated DNS (bind)?", False):<br>>> +            setup_dns=True<br>>> +<br>>> +<br>>> +    # check bind packages are installed<br>>> +    if setup_dns:<br>>>          if not bindinstance.check_inst(options.unattended):<br>>>              sys.exit("Aborting installation")<br>>>  <br>>> @@ -827,7 +838,7 @@ def main():<br>>>      else:<br>>>          admin_password = options.admin_password<br>>>  <br>>> -    if options.setup_dns:<br>>> +    if setup_dns:<br>>>          if options.no_forwarders:<br>>>              dns_forwarders = ()<br>>>          elif options.forwarders:<br>>> @@ -858,7 +869,7 @@ def main():<br>>>      print "Realm name:    %s" % realm_name<br>>>      print<br>>>  <br>>> -    if options.setup_dns:<br>>> +    if setup_dns:<br>>>          print "BIND DNS server will be configured to serve IPA domain with:"<br>>>          print "Forwarders:    %s" % ("No forwarders" if not dns_forwarders \<br>>>                  else ", ".join([str(ip) for ip in dns_forwarders]))<br>>> @@ -1102,7 +1113,7 @@ def main():<br>>>                 persistent_search=options.persistent_search,<br>>>                 serial_autoincrement=options.serial_autoincrement,<br>>>                 ca_configured=not options.selfsign)<br>>> -    if options.setup_dns:<br>>> +    if setup_dns:<br>>>          api.Backend.ldap2.connect(bind_dn=DN(('cn', 'Directory Manager')), bind_pw=dm_password)<br>>>  <br>>>          bind.create_instance()<br>>> @@ -1147,11 +1158,11 @@ def main():<br>>>      print "\t\t  * 80, 443: HTTP/HTTPS"<br>>>      print "\t\t  * 389, 636: LDAP/LDAPS"<br>>>      print "\t\t  * 88, 464: kerberos"<br>>> -    if options.setup_dns:<br>>> +    if setup_dns:<br>>>          print "\t\t  * 53: bind"<br>>>      print "\t\tUDP Ports:"<br>>>      print "\t\t  * 88, 464: kerberos"<br>>> -    if options.setup_dns:<br>>> +    if setup_dns:<br>>>          print "\t\t  * 53: bind"<br>>>      if options.conf_ntp:<br>>>          print "\t\t  * 123: ntp"<br>>><br>>><br>>><br>>><br>>>> Message: 8<br>>>> Date: Wed, 13 Feb 2013 13:39:32 -0800<br>>>> From: Brian Cook <bcook@redhat.com><br>>>> To: "freeipa-devel@redhat.com" <freeipa-devel@redhat.com><br>>>> Subject: [Freeipa-devel] patch for trac 2575<br>>>> Message-ID: <9DD1D1BB-6B86-4EA1-B61B-B208E6BC7152@redhat.com><br>>>> Content-Type: text/plain; charset="windows-1252"<br>>>><br>>>> 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?<br>>>><br>>>> Thanks,<br>>>> Brian<br>>>><br>>>><br>>>> diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install<br>>>> index 1559107..d8c4ae5 100755<br>>>> --- a/install/tools/ipa-server-install<br>>>> +++ b/install/tools/ipa-server-install<br>>>> @@ -564,6 +564,7 @@ def main():<br>>>>     global pw_name<br>>>>     global uninstalling<br>>>>     global installation_cleanup<br>>>> +    <br>>>>     ds = None<br>>>><br>>>>     safe_options, options = parse_options()<br>>>> @@ -740,8 +741,18 @@ def main():<br>>>>     admin_password = ""<br>>>>     reverse_zone = None<br>>>><br>>>> -    # check bind packages are installed<br>>>> +    # Setup a variable to use instead of options.setup_dns to enable interactive DNS selection<br>>>> +    setup_dns=False<br>>>>     if options.setup_dns:<br>>>> +        setup_dns=True<br>>>> +    <br>>>> +    # Ask user if they want to install DNS    <br>>>> +    if ipautil.user_input("Do you want to cnfigure integrated DNS (bind)?", false):<br>>>> +        setup_dns=True<br>>>> +<br>>>> +<br>>>> +    # check bind packages are installed<br>>>> +    if setup_dns:<br>>>>         if not bindinstance.check_inst(options.unattended):<br>>>>             sys.exit("Aborting installation")<br>>>><br>>>> @@ -827,7 +838,7 @@ def main():<br>>>>     else:<br>>>>         admin_password = options.admin_password<br>>>><br>>>> -    if options.setup_dns:<br>>>> +    if setup_dns:<br>>>>         if options.no_forwarders:<br>>>>             dns_forwarders = ()<br>>>>         elif options.forwarders:<br>>>> @@ -858,7 +869,7 @@ def main():<br>>>>     print "Realm name:    %s" % realm_name<br>>>>     print<br>>>><br>>>> -    if options.setup_dns:<br>>>> +    if setup_dns:<br>>>>         print "BIND DNS server will be configured to serve IPA domain with:"<br>>>>         print "Forwarders:    %s" % ("No forwarders" if not dns_forwarders \<br>>>>                 else ", ".join([str(ip) for ip in dns_forwarders]))<br>>>> @@ -1102,7 +1113,7 @@ def main():<br>>>>                persistent_search=options.persistent_search,<br>>>>                serial_autoincrement=options.serial_autoincrement,<br>>>>                ca_configured=not options.selfsign)<br>>>> -    if options.setup_dns:<br>>>> +    if setup_dns:<br>>>>         api.Backend.ldap2.connect(bind_dn=DN(('cn', 'Directory Manager')), bind_pw=dm_password)<br>>>><br>>>>         bind.create_instance()<br>>>> @@ -1147,11 +1158,11 @@ def main():<br>>>>     print "\t\t  * 80, 443: HTTP/HTTPS"<br>>>>     print "\t\t  * 389, 636: LDAP/LDAPS"<br>>>>     print "\t\t  * 88, 464: kerberos"<br>>>> -    if options.setup_dns:<br>>>> +    if setup_dns:<br>>>>         print "\t\t  * 53: bind"<br>>>>     print "\t\tUDP Ports:"<br>>>>     print "\t\t  * 88, 464: kerberos"<br>>>> -    if options.setup_dns:<br>>>> +    if setup_dns:<br>>>>         print "\t\t  * 53: bind"<br>>>>     if options.conf_ntp:<br>>>>         print "\t\t  * 123: ntp"<br>>>><br>>>><br>>>><br>>>><br>>>> -------------- next part --------------<br>>>> An HTML attachment was scrubbed...<br>>>> URL: <https://www.redhat.com/archives/freeipa-devel/attachments/20130213/8be3e343/attachment.html><br>>>><br>>>> ------------------------------<br>>>><br>>>> _______________________________________________<br>>>> Freeipa-devel mailing list<br>>>> Freeipa-devel@redhat.com<br>>>> https://www.redhat.com/mailman/listinfo/freeipa-devel<br>>>><br>>>> End of Freeipa-devel Digest, Vol 69, Issue 49<br>>>> *********************************************<br>>><br>>> _______________________________________________<br>>> Freeipa-devel mailing list<br>>> Freeipa-devel@redhat.com<br>>> https://www.redhat.com/mailman/listinfo/freeipa-devel<br>> <br>> <br><br>_______________________________________________<br>Freeipa-devel mailing list<br>Freeipa-devel@redhat.com<br>https://www.redhat.com/mailman/listinfo/freeipa-devel<br></div><br></div></body></html>