diff options
-rw-r--r-- | cobbler/action_check.py | 8 | ||||
-rw-r--r-- | cobbler/action_litesync.py | 4 | ||||
-rw-r--r-- | cobbler/modules/manage_dnsmasq.py | 5 | ||||
-rw-r--r-- | cobbler/modules/manage_isc_and_bind.py | 4 | ||||
-rw-r--r-- | templates/named.template | 18 | ||||
-rw-r--r-- | templates/zone.template | 13 |
6 files changed, 46 insertions, 6 deletions
diff --git a/cobbler/action_check.py b/cobbler/action_check.py index 588a65a..2004c9f 100644 --- a/cobbler/action_check.py +++ b/cobbler/action_check.py @@ -48,7 +48,13 @@ class BootCheck: else: status.append(_("configured management mode in modules.conf is unknown")) # FIXME: add in checks for bind config - + if self.settings.manage_dns: + mode = self.config.api.get_sync().manager.what() + if mode == "isc_and_bind": + #self.check_bind_bin(status) + #self.check_service(status,"dhcpd") + pass + self.check_service(status, "cobblerd") self.check_bootloaders(status) diff --git a/cobbler/action_litesync.py b/cobbler/action_litesync.py index ba0a256..9df99cc 100644 --- a/cobbler/action_litesync.py +++ b/cobbler/action_litesync.py @@ -117,8 +117,8 @@ class BootLiteSync: self.sync.manager.write_dhcp_lease( self.settings.omapi_port, interface["hostname"], - interface["mac-address"], - interface["ip-address"] + interface["mac_address"], + interface["ip_address"] ) diff --git a/cobbler/modules/manage_dnsmasq.py b/cobbler/modules/manage_dnsmasq.py index d37a2d4..465995f 100644 --- a/cobbler/modules/manage_dnsmasq.py +++ b/cobbler/modules/manage_dnsmasq.py @@ -55,7 +55,6 @@ class DnsmasqManager: self.settings = config.settings() self.repos = config.repos() self.templar = templar.Templar(config) - self.dns = dns def what(self): return "dnsmasq" @@ -186,6 +185,10 @@ class DnsmasqManager: fh.write(ip + "\t" + host + "\n") fh.close() + def write_dns_files(self): + # already taken care of by the regen_hosts() + pass + def get_manager(config): return DnsmasqManager(config) diff --git a/cobbler/modules/manage_isc_and_bind.py b/cobbler/modules/manage_isc_and_bind.py index bc3a338..3927c69 100644 --- a/cobbler/modules/manage_isc_and_bind.py +++ b/cobbler/modules/manage_isc_and_bind.py @@ -213,8 +213,8 @@ class IscAndBindManager: if mac is not None and mac != "": if host is not None and host != "": if self.settings.omapi_enabled and self.settings.omapi_port: - self.removeDHCPLease(self.settings.omapi_port,host) - self.writeDHCPLease(self.settings.omapi_port,host,ip,mac) + self.remove_dhcp_lease(self.settings.omapi_port,host) + self.write_dhcp_lease(self.settings.omapi_port,host,ip,mac) dhcp_tag = interface["dhcp_tag"] if dhcp_tag == "": diff --git a/templates/named.template b/templates/named.template new file mode 100644 index 0000000..f77eadc --- /dev/null +++ b/templates/named.template @@ -0,0 +1,18 @@ +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; + }; +}; + +$zone_include diff --git a/templates/zone.template b/templates/zone.template new file mode 100644 index 0000000..5426f78 --- /dev/null +++ b/templates/zone.template @@ -0,0 +1,13 @@ +\$TTL 300 +@ IN SOA $cobbler_server. nobody.example.com. ( + $serial ; Serial + 600 ; Refresh + 1800 ; Retry + 604800 ; Expire + 300 ; TTL + ) + + IN NS $cobbler_server. + + +$host_record |