[Freeipa-devel] patch for trac 2575

Brian Cook bcook at redhat.com
Wed Feb 13 21:39:32 UTC 2013


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"




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20130213/8be3e343/attachment.htm>


More information about the Freeipa-devel mailing list