~james-page/ubuntu/natty/cobbler/fix-764391

« back to all changes in this revision

Viewing changes to cobbler/modules/manage_bind.py

  • Committer: James Page
  • Date: 2011-04-18 10:31:54 UTC
  • Revision ID: james.page@canonical.com-20110418103154-hlxha02vd2o0h3dg
* Fixed management of bind9 (LP: #764391):
  - debian/patches/40_ubuntu_bind9_management.patch:
    - Manage bind9 instead of named daemon.
    - Generate configuration in /etc/bind.
    - Use default bind9 configuration as much as possible.

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
        """
181
181
        Write out the named.conf main config file from the template.
182
182
        """
183
 
        settings_file = "/etc/named.conf"
 
183
        settings_file = "/etc/bind/named.conf.local"
184
184
        template_file = "/etc/cobbler/named.template"
185
185
        forward_zones = self.settings.manage_forward_zones
186
186
        reverse_zones = self.settings.manage_reverse_zones
291
291
 
292
292
            metadata['host_record'] = self.__pretty_print_host_records(hosts)
293
293
 
294
 
            zonefilename='/var/named/' + zone
 
294
            zonefilename='/etc/bind/db.' + zone
295
295
            if self.logger is not None:
296
296
               self.logger.info("generating (forward) %s" % zonefilename)
297
297
            self.templar.render(template_data, metadata, zonefilename, None)
313
313
 
314
314
            metadata['host_record'] = self.__pretty_print_host_records(hosts, rectype='PTR')
315
315
 
316
 
            zonefilename='/var/named/' + zone
 
316
            zonefilename='/etc/bind/db.' + zone
317
317
            if self.logger is not None:
318
318
               self.logger.info("generating (reverse) %s" % zonefilename)
319
319
            self.templar.render(template_data, metadata, zonefilename, None)