From: Manuel Worschech Date: Sat, 16 Aug 2014 20:17:04 +0000 (+0200) Subject: Added support for selecting a DNS zone nsupdate should use. X-Git-Tag: 005~26 X-Git-Url: http://git.ipfire.org/?p=oddments%2Fddns.git;a=commitdiff_plain;h=97998aac8a6a7639f2577aebe31f1caaac69c971 Added support for selecting a DNS zone nsupdate should use. --- diff --git a/ddns.conf.sample b/ddns.conf.sample index de9516c..2a9642f 100644 --- a/ddns.conf.sample +++ b/ddns.conf.sample @@ -25,6 +25,7 @@ # # (optional) # server = 1.2.3.4 +# zone = somezone.bind.nsupdate # key = name # secret = XYZ # ttl = 60 diff --git a/src/ddns/providers.py b/src/ddns/providers.py index 43fc6bf..0fc6ec0 100644 --- a/src/ddns/providers.py +++ b/src/ddns/providers.py @@ -320,6 +320,11 @@ class DDNSProviderBindNsupdate(DDNSProvider): if server: scriptlet.append("server %s" % server) + # Set the DNS zone the host should be added to. + zone = self.get("zone", None) + if zone: + scriptlet.append("zone %s" % zone) + key = self.get("key", None) if key: secret = self.get("secret")