diff options
author | Rob Crittenden <rcritten@redhat.com> | 2010-09-20 15:41:20 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2010-09-23 12:00:12 -0400 |
commit | a7ba867438760b86ccb6c57e8e2d1a64ef9158e5 (patch) | |
tree | 69d46a93f69652f6e1ea8a4fe0ad3bb221f1897a /ipaserver | |
parent | 9fd7fedb766c5da128728b036ebd02157086b6e8 (diff) | |
download | freeipa-a7ba867438760b86ccb6c57e8e2d1a64ef9158e5.tar.gz freeipa-a7ba867438760b86ccb6c57e8e2d1a64ef9158e5.tar.xz freeipa-a7ba867438760b86ccb6c57e8e2d1a64ef9158e5.zip |
Add new DNS install argument for setting the zone mgr e-mail addr.
ticket 125
Diffstat (limited to 'ipaserver')
-rw-r--r-- | ipaserver/install/bindinstance.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py index a144193b7..a6b490036 100644 --- a/ipaserver/install/bindinstance.py +++ b/ipaserver/install/bindinstance.py @@ -91,13 +91,14 @@ def get_reverse_zone(ip_address): return zone, name -def add_zone(name, update_policy=None, dns_backup=None): +def add_zone(name, update_policy=None, zonemgr=None, dns_backup=None): if not update_policy: update_policy = "grant %s krb5-self * A;" % api.env.realm try: api.Command.dns_add(unicode(name), idnssoamname=unicode(api.env.host+"."), + idnssoarname=unicode(zonemgr), idnsallowdynupdate=True, idnsupdatepolicy=unicode(update_policy)) except (errors.DuplicateEntry, errors.EmptyModlist): @@ -202,7 +203,7 @@ class BindInstance(service.Service): else: self.fstore = sysrestore.FileStore('/var/lib/ipa/sysrestore') - def setup(self, fqdn, ip_address, realm_name, domain_name, forwarders, ntp, named_user="named"): + def setup(self, fqdn, ip_address, realm_name, domain_name, forwarders, ntp, named_user="named", zonemgr=None): self.named_user = named_user self.fqdn = fqdn self.ip_address = ip_address @@ -213,6 +214,11 @@ class BindInstance(service.Service): self.suffix = util.realm_to_suffix(self.realm) self.ntp = ntp + if zonemgr: + self.zonemgr = zonemgr.replace('@','.') + else: + self.zonemgr = 'root.%s.%s' % (self.host, self.domain) + tmp = ip_address.split(".") tmp.reverse() @@ -283,7 +289,8 @@ class BindInstance(service.Service): SERVER_ID=realm_to_serverid(self.realm), FORWARDERS=fwds, SUFFIX=self.suffix, - OPTIONAL_NTP=optional_ntp) + OPTIONAL_NTP=optional_ntp, + ZONEMGR=self.zonemgr) def __setup_dns_container(self): self._ldap_mod("dns.ldif", self.sub_dict) @@ -301,7 +308,7 @@ class BindInstance(service.Service): ("_kpasswd._udp", "SRV", "0 100 464 %s" % self.host), ) - zone = add_zone(self.domain, dns_backup=self.dns_backup) + zone = add_zone(self.domain, zonemgr=self.zonemgr, dns_backup=self.dns_backup) for (host, type, rdata) in resource_records: if type == "SRV": |