Description: Enable management of bind9 with manage_dns setting.
 - Generate /etc/bind/named.conf.local to plug into the standard Debian bind9 
   install and preserve the bind9 default installation configuration.
 - Generate /etc/bind/db.$zone to align to bind9 zone file names.
Bug-Ubuntu: https://launchpad.net/bugs/764391
Author: James Page <james.page@canonical.com>
Forwarded: not-needed

Index: fix-764391/templates/etc/named.template
===================================================================
--- fix-764391.orig/templates/etc/named.template	2011-04-18 10:46:43.057345158 +0100
+++ fix-764391/templates/etc/named.template	2011-04-18 10:47:23.426906461 +0100
@@ -1,31 +1,14 @@
-options {
-          listen-on port 53 { 127.0.0.1; };
-          directory       "/var/named";
-          dump-file       "/var/named/data/cache_dump.db";
-          statistics-file "/var/named/data/named_stats.txt";
-          memstatistics-file "/var/named/data/named_mem_stats.txt";
-          allow-query     { localhost; };
-          recursion yes;
-};
-
-logging {
-        channel default_debug {
-                file "data/named.run";
-                severity dynamic;
-        };
-};
-
 #for $zone in $forward_zones
 zone "${zone}." {
     type master;
-    file "$zone";
+    file "/etc/bind/db.$zone";
 };
 
 #end for
 #for $zone, $arpa in $reverse_zones
 zone "${arpa}." {
     type master;
-    file "$zone";
+    file "/etc/bind/db.$zone";
 };
 
 #end for
Index: fix-764391/cobbler/action_check.py
===================================================================
--- fix-764391.orig/cobbler/action_check.py	2011-04-18 10:50:24.566792922 +0100
+++ fix-764391/cobbler/action_check.py	2011-04-18 10:50:49.546726457 +0100
@@ -66,7 +66,7 @@
            mode = self.config.api.get_sync().dns.what()
            if mode == "bind":
                self.check_bind_bin(status)
-               self.check_service(status,"named")
+               self.check_service(status,"bind9")
            elif mode == "dnsmasq" and not self.settings.manage_dhcp:
                self.check_dnsmasq_bin(status)
                self.check_service(status,"dnsmasq")
