Re: [Freeipa-devel] patch for trac 2575

2013-03-21 Thread Martin Kosek
On 02/21/2013 02:39 PM, Martin Kosek wrote:
 Thanks Brian. I still see few issues though:
 
 1) The patch adds a whitespace error:
 
 $ git apply ~/freeipa-bcook-0001-Add-DNS-Setup-Prompt-to-Install.patch
 /home/mkosek/freeipa-bcook-0001-Add-DNS-Setup-Prompt-to-Install.patch:41:
 trailing whitespace.
 
 warning: 1 line adds whitespace errors
 
 2) It does unrelated and unnecessary changes to the main function:
 
 --- a/install/tools/ipa-server-install
 +++ b/install/tools/ipa-server-install
 @@ -560,10 +560,16 @@ def set_subject_in_config(realm_name, dm_password,
 suffix, subject_base):
  conn.disconnect()
 
  def main():
 +
 +
 +
 +:return:
 +
  global ds
  global pw_name
  global uninstalling
  global installation_cleanup
 +
  ds = None
 
  safe_options, options = parse_options()
 
 3) In the question, I would replace bind with BIND as this is how the
 project should be spelled. I see that few lines above we also refer to BIND
 with bind (it may have caused the confusion), I think this can be fixed too.
 
 Martin

Hello Brian,

I did not see any response to my mail below so I went ahead and made these
fixes myself as we want this in our next release (updated patch attached).

ACK. Pushed to master.

Martin

From 736088025996d2d2d574ba8ad7f48b5e7d70729a Mon Sep 17 00:00:00 2001
From: Brian Cook bc...@redhat.com
Date: Thu, 14 Feb 2013 08:49:17 -0800
Subject: [PATCH] Add DNS Setup Prompt to Install

Currently the only way to setup integrated DNS is by passing --setup-dns
to ipa-server-install. This patch modifies install so that if
--setup-dns is not passed, the user is asked if they want to configure
integrated dns.

http://fedorahosted.org/freeipa/ticket/2575
---
 install/tools/ipa-server-install | 5 +
 1 file changed, 5 insertions(+)

diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install
index 57511c2147e52c78b1da894a7d7e83e9cb974acf..479894b36ba94f8f6ff2bec4cd1b3e371fddcbff 100755
--- a/install/tools/ipa-server-install
+++ b/install/tools/ipa-server-install
@@ -750,6 +750,11 @@ def main():
 admin_password = 
 reverse_zone = None
 
+if not options.setup_dns and not options.unattended:
+if ipautil.user_input(Do you want to configure integrated DNS (BIND)?, False):
+options.setup_dns = True
+print 
+
 # check bind packages are installed
 if options.setup_dns:
 if not bindinstance.check_inst(options.unattended):
-- 
1.8.1.4

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Re: [Freeipa-devel] patch for trac 2575

2013-02-21 Thread Martin Kosek
Thanks Brian. I still see few issues though:

1) The patch adds a whitespace error:

$ git apply ~/freeipa-bcook-0001-Add-DNS-Setup-Prompt-to-Install.patch
/home/mkosek/freeipa-bcook-0001-Add-DNS-Setup-Prompt-to-Install.patch:41:
trailing whitespace.

warning: 1 line adds whitespace errors

2) It does unrelated and unnecessary changes to the main function:

--- a/install/tools/ipa-server-install
+++ b/install/tools/ipa-server-install
@@ -560,10 +560,16 @@ def set_subject_in_config(realm_name, dm_password,
suffix, subject_base):
 conn.disconnect()

 def main():
+
+
+
+:return:
+
 global ds
 global pw_name
 global uninstalling
 global installation_cleanup
+
 ds = None

 safe_options, options = parse_options()

3) In the question, I would replace bind with BIND as this is how the
project should be spelled. I see that few lines above we also refer to BIND
with bind (it may have caused the confusion), I think this can be fixed too.

Martin


On 02/15/2013 03:07 AM, Brian Cook wrote:
 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.
 
 Thanks,
 Brian 
 
 
 ---
 *From: *Martin Kosek mko...@redhat.com
 *To: *d...@redhat.com
 *Cc: *freeipa-devel@redhat.com
 *Sent: *Wednesday, February 13, 2013 11:16:51 PM
 *Subject: *Re: [Freeipa-devel] patch for trac 2575
 
 On 02/14/2013 03:49 AM, Dmitri Pal wrote:
 On 02/13/2013 05:20 PM, Brian Cook wrote:
 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.

 Brian

 Brian,

 Thanks for the patch.
 Can you please format it following these guidelines:
 https://fedorahosted.org/freeipa/wiki/PatchFormat

 Thanks
 Dmitri
 
 Hello Brian,
 
 Thanks for the patch! Also few technical notes:
 
 1) There is no need to invent the new variable, you can ask and set
 options.setup_dns to True. We already to this in other parts incode
 
 2) This patch would --unattended mode when no --setup-dns is passed
 
 Martin
 



 diff --git a/install/tools/ipa-server-install 
 b/install/tools/ipa-server-install
 index 1559107..96ef802 100755
 --- a/install/tools/ipa-server-install
 +++ b/install/tools/ipa-server-install
 @@ -564,6 +564,7 @@ def main():
  global pw_name
  global uninstalling
  global installation_cleanup
 +
  ds = None
  
  safe_options, options = parse_options()
 @@ -740,8 +741,18 @@ def main():
  admin_password = 
  reverse_zone = None
  
 -# check bind packages are installed
 +# Setup a variable to use instead of options.setup_dns to enable
 interactive DNS selection
 +setup_dns=False
  if options.setup_dns:
 +setup_dns=True
 +else:
 +# Ask user if they want to install DNS
 +if ipautil.user_input(Do you want to configure integrated DNS
 (bind)?, False):
 +setup_dns=True
 +
 +
 +# check bind packages are installed
 +if setup_dns:
  if not bindinstance.check_inst(options.unattended):
  sys.exit(Aborting installation)
  
 @@ -827,7 +838,7 @@ def main():
  else:
  admin_password = options.admin_password
  
 -if options.setup_dns:
 +if setup_dns:
  if options.no_forwarders:
  dns_forwarders = ()
  elif options.forwarders:
 @@ -858,7 +869,7 @@ def main():
  print Realm name:%s % realm_name
  print
  
 -if options.setup_dns:
 +if setup_dns:
  print BIND DNS server will be configured to serve IPA domain 
 with:
  print Forwarders:%s % (No forwarders if not dns_forwarders 
 \
  else , .join([str(ip) for ip in dns_forwarders]))
 @@ -1102,7 +1113,7 @@ def main():
 persistent_search=options.persistent_search,
 serial_autoincrement=options.serial_autoincrement,
 ca_configured=not options.selfsign)
 -if options.setup_dns:
 +if setup_dns:
  api.Backend.ldap2.connect(bind_dn=DN(('cn', 'Directory Manager')),
 bind_pw=dm_password)
  
  bind.create_instance()
 @@ -1147,11 +1158,11 @@ def main():
  print \t\t  * 80, 443: HTTP/HTTPS
  print \t\t  * 389, 636: LDAP/LDAPS
  print \t\t  * 88, 464: kerberos
 -if options.setup_dns:
 +if setup_dns:
  print \t\t  * 53: bind
  print \t\tUDP Ports:
  print \t\t  * 88, 464: kerberos
 -if options.setup_dns:
 +if setup_dns:
  print \t\t  * 53: bind
  if options.conf_ntp:
  print \t\t  * 123: ntp




 Message: 8
 Date: Wed, 13 Feb 2013 13:39:32 -0800
 From: Brian Cook bc...@redhat.com
 To: freeipa-devel@redhat.com freeipa-devel@redhat.com
 Subject: [Freeipa-devel] patch for trac 2575
 Message-ID: 9dd1d1bb-6b86-4ea1-b61b-b208e6bc7...@redhat.com
 Content-Type: text/plain; charset=windows-1252

 This is a patch

Re: [Freeipa-devel] patch for trac 2575

2013-02-14 Thread Brian Cook
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. 



Thanks, 

Brian 


- Original Message -

From: Martin Kosek mko...@redhat.com 
To: d...@redhat.com 
Cc: freeipa-devel@redhat.com 
Sent: Wednesday, February 13, 2013 11:16:51 PM 
Subject: Re: [Freeipa-devel] patch for trac 2575 

On 02/14/2013 03:49 AM, Dmitri Pal wrote: 
 On 02/13/2013 05:20 PM, Brian Cook wrote: 
 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. 
 
 Brian 
 
 Brian, 
 
 Thanks for the patch. 
 Can you please format it following these guidelines: 
 https://fedorahosted.org/freeipa/wiki/PatchFormat 
 
 Thanks 
 Dmitri 

Hello Brian, 

Thanks for the patch! Also few technical notes: 

1) There is no need to invent the new variable, you can ask and set 
options.setup_dns to True. We already to this in other parts incode 

2) This patch would --unattended mode when no --setup-dns is passed 

Martin 

 
 
 
 diff --git a/install/tools/ipa-server-install 
 b/install/tools/ipa-server-install 
 index 1559107..96ef802 100755 
 --- a/install/tools/ipa-server-install 
 +++ b/install/tools/ipa-server-install 
 @@ -564,6 +564,7 @@ def main(): 
 global pw_name 
 global uninstalling 
 global installation_cleanup 
 + 
 ds = None 
 
 safe_options, options = parse_options() 
 @@ -740,8 +741,18 @@ def main(): 
 admin_password =  
 reverse_zone = None 
 
 - # check bind packages are installed 
 + # Setup a variable to use instead of options.setup_dns to enable 
 interactive DNS selection 
 + setup_dns=False 
 if options.setup_dns: 
 + setup_dns=True 
 + else: 
 + # Ask user if they want to install DNS 
 + if ipautil.user_input(Do you want to configure integrated DNS (bind)?, 
 False): 
 + setup_dns=True 
 + 
 + 
 + # check bind packages are installed 
 + if setup_dns: 
 if not bindinstance.check_inst(options.unattended): 
 sys.exit(Aborting installation) 
 
 @@ -827,7 +838,7 @@ def main(): 
 else: 
 admin_password = options.admin_password 
 
 - if options.setup_dns: 
 + if setup_dns: 
 if options.no_forwarders: 
 dns_forwarders = () 
 elif options.forwarders: 
 @@ -858,7 +869,7 @@ def main(): 
 print Realm name: %s % realm_name 
 print 
 
 - if options.setup_dns: 
 + if setup_dns: 
 print BIND DNS server will be configured to serve IPA domain with: 
 print Forwarders: %s % (No forwarders if not dns_forwarders \ 
 else , .join([str(ip) for ip in dns_forwarders])) 
 @@ -1102,7 +1113,7 @@ def main(): 
 persistent_search=options.persistent_search, 
 serial_autoincrement=options.serial_autoincrement, 
 ca_configured=not options.selfsign) 
 - if options.setup_dns: 
 + if setup_dns: 
 api.Backend.ldap2.connect(bind_dn=DN(('cn', 'Directory Manager')), 
 bind_pw=dm_password) 
 
 bind.create_instance() 
 @@ -1147,11 +1158,11 @@ def main(): 
 print \t\t * 80, 443: HTTP/HTTPS 
 print \t\t * 389, 636: LDAP/LDAPS 
 print \t\t * 88, 464: kerberos 
 - if options.setup_dns: 
 + if setup_dns: 
 print \t\t * 53: bind 
 print \t\tUDP Ports: 
 print \t\t * 88, 464: kerberos 
 - if options.setup_dns: 
 + if setup_dns: 
 print \t\t * 53: bind 
 if options.conf_ntp: 
 print \t\t * 123: ntp 
 
 
 
 
 Message: 8 
 Date: Wed, 13 Feb 2013 13:39:32 -0800 
 From: Brian Cook bc...@redhat.com 
 To: freeipa-devel@redhat.com freeipa-devel@redhat.com 
 Subject: [Freeipa-devel] patch for trac 2575 
 Message-ID: 9dd1d1bb-6b86-4ea1-b61b-b208e6bc7...@redhat.com 
 Content-Type: text/plain; charset=windows-1252 
 
 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? 
 
 Thanks, 
 Brian 
 
 
 diff --git a/install/tools/ipa-server-install 
 b/install/tools/ipa-server-install 
 index 1559107..d8c4ae5 100755 
 --- a/install/tools/ipa-server-install 
 +++ b/install/tools/ipa-server-install 
 @@ -564,6 +564,7 @@ def main(): 
 global pw_name 
 global uninstalling 
 global installation_cleanup 
 + 
 ds = None 
 
 safe_options, options = parse_options() 
 @@ -740,8 +741,18 @@ def main(): 
 admin_password =  
 reverse_zone = None 
 
 - # check bind packages are installed 
 + # Setup a variable to use instead of options.setup_dns to enable 
 interactive DNS selection 
 + setup_dns=False 
 if options.setup_dns: 
 + setup_dns=True 
 + 
 + # Ask user if they want to install DNS 
 + if ipautil.user_input(Do you want to cnfigure integrated DNS (bind)?, 
 false): 
 + setup_dns=True 
 + 
 + 
 + # check bind packages are installed 
 + if setup_dns: 
 if not bindinstance.check_inst(options.unattended): 
 sys.exit(Aborting installation) 
 
 @@ -827,7 +838,7 @@ def main(): 
 else: 
 admin_password = options.admin_password 
 
 - if options.setup_dns: 
 + if setup_dns: 
 if options.no_forwarders: 
 dns_forwarders = () 
 elif options.forwarders: 
 @@ -858,7 +869,7 @@ def main

[Freeipa-devel] patch for trac 2575

2013-02-13 Thread Brian Cook
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…

Thanks,
Brian


diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install
index 1559107..d8c4ae5 100755
--- a/install/tools/ipa-server-install
+++ b/install/tools/ipa-server-install
@@ -564,6 +564,7 @@ def main():
 global pw_name
 global uninstalling
 global installation_cleanup
+
 ds = None
 
 safe_options, options = parse_options()
@@ -740,8 +741,18 @@ def main():
 admin_password = 
 reverse_zone = None
 
-# check bind packages are installed
+# Setup a variable to use instead of options.setup_dns to enable 
interactive DNS selection
+setup_dns=False
 if options.setup_dns:
+setup_dns=True
+
+# Ask user if they want to install DNS
+if ipautil.user_input(Do you want to cnfigure integrated DNS (bind)?, 
false):
+   setup_dns=True
+
+
+# check bind packages are installed
+if setup_dns:
 if not bindinstance.check_inst(options.unattended):
 sys.exit(Aborting installation)
 
@@ -827,7 +838,7 @@ def main():
 else:
 admin_password = options.admin_password
 
-if options.setup_dns:
+if setup_dns:
 if options.no_forwarders:
 dns_forwarders = ()
 elif options.forwarders:
@@ -858,7 +869,7 @@ def main():
 print Realm name:%s % realm_name
 print
 
-if options.setup_dns:
+if setup_dns:
 print BIND DNS server will be configured to serve IPA domain with:
 print Forwarders:%s % (No forwarders if not dns_forwarders \
 else , .join([str(ip) for ip in dns_forwarders]))
@@ -1102,7 +1113,7 @@ def main():
persistent_search=options.persistent_search,
serial_autoincrement=options.serial_autoincrement,
ca_configured=not options.selfsign)
-if options.setup_dns:
+if setup_dns:
 api.Backend.ldap2.connect(bind_dn=DN(('cn', 'Directory Manager')), 
bind_pw=dm_password)
 
 bind.create_instance()
@@ -1147,11 +1158,11 @@ def main():
 print \t\t  * 80, 443: HTTP/HTTPS
 print \t\t  * 389, 636: LDAP/LDAPS
 print \t\t  * 88, 464: kerberos
-if options.setup_dns:
+if setup_dns:
 print \t\t  * 53: bind
 print \t\tUDP Ports:
 print \t\t  * 88, 464: kerberos
-if options.setup_dns:
+if setup_dns:
 print \t\t  * 53: bind
 if options.conf_ntp:
 print \t\t  * 123: ntp




___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Re: [Freeipa-devel] patch for trac 2575

2013-02-13 Thread Dmitri Pal
On 02/13/2013 05:20 PM, Brian Cook wrote:
 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.

 Brian

Brian,

Thanks for the patch.
Can you please format it following these guidelines:
https://fedorahosted.org/freeipa/wiki/PatchFormat

Thanks
Dmitri



 diff --git a/install/tools/ipa-server-install 
 b/install/tools/ipa-server-install
 index 1559107..96ef802 100755
 --- a/install/tools/ipa-server-install
 +++ b/install/tools/ipa-server-install
 @@ -564,6 +564,7 @@ def main():
  global pw_name
  global uninstalling
  global installation_cleanup
 +
  ds = None
  
  safe_options, options = parse_options()
 @@ -740,8 +741,18 @@ def main():
  admin_password = 
  reverse_zone = None
  
 -# check bind packages are installed
 +# Setup a variable to use instead of options.setup_dns to enable 
 interactive DNS selection
 +setup_dns=False
  if options.setup_dns:
 +setup_dns=True
 +else:
 +# Ask user if they want to install DNS
 +if ipautil.user_input(Do you want to configure integrated DNS 
 (bind)?, False):
 + setup_dns=True
 +
 +
 +# check bind packages are installed
 +if setup_dns:
  if not bindinstance.check_inst(options.unattended):
  sys.exit(Aborting installation)
  
 @@ -827,7 +838,7 @@ def main():
  else:
  admin_password = options.admin_password
  
 -if options.setup_dns:
 +if setup_dns:
  if options.no_forwarders:
  dns_forwarders = ()
  elif options.forwarders:
 @@ -858,7 +869,7 @@ def main():
  print Realm name:%s % realm_name
  print
  
 -if options.setup_dns:
 +if setup_dns:
  print BIND DNS server will be configured to serve IPA domain with:
  print Forwarders:%s % (No forwarders if not dns_forwarders \
  else , .join([str(ip) for ip in dns_forwarders]))
 @@ -1102,7 +1113,7 @@ def main():
 persistent_search=options.persistent_search,
 serial_autoincrement=options.serial_autoincrement,
 ca_configured=not options.selfsign)
 -if options.setup_dns:
 +if setup_dns:
  api.Backend.ldap2.connect(bind_dn=DN(('cn', 'Directory Manager')), 
 bind_pw=dm_password)
  
  bind.create_instance()
 @@ -1147,11 +1158,11 @@ def main():
  print \t\t  * 80, 443: HTTP/HTTPS
  print \t\t  * 389, 636: LDAP/LDAPS
  print \t\t  * 88, 464: kerberos
 -if options.setup_dns:
 +if setup_dns:
  print \t\t  * 53: bind
  print \t\tUDP Ports:
  print \t\t  * 88, 464: kerberos
 -if options.setup_dns:
 +if setup_dns:
  print \t\t  * 53: bind
  if options.conf_ntp:
  print \t\t  * 123: ntp




 Message: 8
 Date: Wed, 13 Feb 2013 13:39:32 -0800
 From: Brian Cook bc...@redhat.com
 To: freeipa-devel@redhat.com freeipa-devel@redhat.com
 Subject: [Freeipa-devel] patch for trac 2575
 Message-ID: 9dd1d1bb-6b86-4ea1-b61b-b208e6bc7...@redhat.com
 Content-Type: text/plain; charset=windows-1252

 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?

 Thanks,
 Brian


 diff --git a/install/tools/ipa-server-install 
 b/install/tools/ipa-server-install
 index 1559107..d8c4ae5 100755
 --- a/install/tools/ipa-server-install
 +++ b/install/tools/ipa-server-install
 @@ -564,6 +564,7 @@ def main():
 global pw_name
 global uninstalling
 global installation_cleanup
 +
 ds = None

 safe_options, options = parse_options()
 @@ -740,8 +741,18 @@ def main():
 admin_password = 
 reverse_zone = None

 -# check bind packages are installed
 +# Setup a variable to use instead of options.setup_dns to enable 
 interactive DNS selection
 +setup_dns=False
 if options.setup_dns:
 +setup_dns=True
 +
 +# Ask user if they want to install DNS
 +if ipautil.user_input(Do you want to cnfigure integrated DNS (bind)?, 
 false):
 +setup_dns=True
 +
 +
 +# check bind packages are installed
 +if setup_dns:
 if not bindinstance.check_inst(options.unattended):
 sys.exit(Aborting installation)

 @@ -827,7 +838,7 @@ def main():
 else:
 admin_password = options.admin_password

 -if options.setup_dns:
 +if setup_dns:
 if options.no_forwarders:
 dns_forwarders = ()
 elif options.forwarders:
 @@ -858,7 +869,7 @@ def main():
 print Realm name:%s % realm_name
 print

 -if options.setup_dns:
 +if setup_dns:
 print BIND DNS server will be configured to serve IPA domain with:
 print Forwarders:%s % (No forwarders if not dns_forwarders \
 else , .join([str(ip) for ip in dns_forwarders]))
 @@ -1102,7 +1113,7 @@ def main

Re: [Freeipa-devel] patch for trac 2575

2013-02-13 Thread Martin Kosek
On 02/14/2013 03:49 AM, Dmitri Pal wrote:
 On 02/13/2013 05:20 PM, Brian Cook wrote:
 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.

 Brian
 
 Brian,
 
 Thanks for the patch.
 Can you please format it following these guidelines:
 https://fedorahosted.org/freeipa/wiki/PatchFormat
 
 Thanks
 Dmitri

Hello Brian,

Thanks for the patch! Also few technical notes:

1) There is no need to invent the new variable, you can ask and set
options.setup_dns to True. We already to this in other parts incode

2) This patch would --unattended mode when no --setup-dns is passed

Martin




 diff --git a/install/tools/ipa-server-install 
 b/install/tools/ipa-server-install
 index 1559107..96ef802 100755
 --- a/install/tools/ipa-server-install
 +++ b/install/tools/ipa-server-install
 @@ -564,6 +564,7 @@ def main():
  global pw_name
  global uninstalling
  global installation_cleanup
 +
  ds = None
  
  safe_options, options = parse_options()
 @@ -740,8 +741,18 @@ def main():
  admin_password = 
  reverse_zone = None
  
 -# check bind packages are installed
 +# Setup a variable to use instead of options.setup_dns to enable 
 interactive DNS selection
 +setup_dns=False
  if options.setup_dns:
 +setup_dns=True
 +else:
 +# Ask user if they want to install DNS
 +if ipautil.user_input(Do you want to configure integrated DNS 
 (bind)?, False):
 +setup_dns=True
 +
 +
 +# check bind packages are installed
 +if setup_dns:
  if not bindinstance.check_inst(options.unattended):
  sys.exit(Aborting installation)
  
 @@ -827,7 +838,7 @@ def main():
  else:
  admin_password = options.admin_password
  
 -if options.setup_dns:
 +if setup_dns:
  if options.no_forwarders:
  dns_forwarders = ()
  elif options.forwarders:
 @@ -858,7 +869,7 @@ def main():
  print Realm name:%s % realm_name
  print
  
 -if options.setup_dns:
 +if setup_dns:
  print BIND DNS server will be configured to serve IPA domain with:
  print Forwarders:%s % (No forwarders if not dns_forwarders \
  else , .join([str(ip) for ip in dns_forwarders]))
 @@ -1102,7 +1113,7 @@ def main():
 persistent_search=options.persistent_search,
 serial_autoincrement=options.serial_autoincrement,
 ca_configured=not options.selfsign)
 -if options.setup_dns:
 +if setup_dns:
  api.Backend.ldap2.connect(bind_dn=DN(('cn', 'Directory Manager')), 
 bind_pw=dm_password)
  
  bind.create_instance()
 @@ -1147,11 +1158,11 @@ def main():
  print \t\t  * 80, 443: HTTP/HTTPS
  print \t\t  * 389, 636: LDAP/LDAPS
  print \t\t  * 88, 464: kerberos
 -if options.setup_dns:
 +if setup_dns:
  print \t\t  * 53: bind
  print \t\tUDP Ports:
  print \t\t  * 88, 464: kerberos
 -if options.setup_dns:
 +if setup_dns:
  print \t\t  * 53: bind
  if options.conf_ntp:
  print \t\t  * 123: ntp




 Message: 8
 Date: Wed, 13 Feb 2013 13:39:32 -0800
 From: Brian Cook bc...@redhat.com
 To: freeipa-devel@redhat.com freeipa-devel@redhat.com
 Subject: [Freeipa-devel] patch for trac 2575
 Message-ID: 9dd1d1bb-6b86-4ea1-b61b-b208e6bc7...@redhat.com
 Content-Type: text/plain; charset=windows-1252

 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?

 Thanks,
 Brian


 diff --git a/install/tools/ipa-server-install 
 b/install/tools/ipa-server-install
 index 1559107..d8c4ae5 100755
 --- a/install/tools/ipa-server-install
 +++ b/install/tools/ipa-server-install
 @@ -564,6 +564,7 @@ def main():
 global pw_name
 global uninstalling
 global installation_cleanup
 +
 ds = None

 safe_options, options = parse_options()
 @@ -740,8 +741,18 @@ def main():
 admin_password = 
 reverse_zone = None

 -# check bind packages are installed
 +# Setup a variable to use instead of options.setup_dns to enable 
 interactive DNS selection
 +setup_dns=False
 if options.setup_dns:
 +setup_dns=True
 +
 +# Ask user if they want to install DNS
 +if ipautil.user_input(Do you want to cnfigure integrated DNS 
 (bind)?, false):
 +   setup_dns=True
 +
 +
 +# check bind packages are installed
 +if setup_dns:
 if not bindinstance.check_inst(options.unattended):
 sys.exit(Aborting installation)

 @@ -827,7 +838,7 @@ def main():
 else:
 admin_password = options.admin_password

 -if options.setup_dns:
 +if setup_dns:
 if options.no_forwarders:
 dns_forwarders = ()
 elif options.forwarders:
 @@ -858,7 +869,7 @@ def main():
 print Realm name:%s