summaryrefslogtreecommitdiff
path: root/scripts/dynamic-dns
diff options
context:
space:
mode:
authorkouak <kouak@kouak.org>2015-02-20 17:21:14 +0100
committerkouak <kouak@kouak.org>2015-02-20 17:21:14 +0100
commit7367b369a3df9e868a8b5f37edaceaa58cdd0732 (patch)
tree99c91904641d2064ab2355bda8802be7ba04e457 /scripts/dynamic-dns
parent2df5339f426574b3e33174f7f193e933ffec3cf6 (diff)
downloadvyatta-cfg-system-7367b369a3df9e868a8b5f37edaceaa58cdd0732.tar.gz
vyatta-cfg-system-7367b369a3df9e868a8b5f37edaceaa58cdd0732.zip
Add RFC2136 configuration options for ddclient 3.8.2 (#389)
Diffstat (limited to 'scripts/dynamic-dns')
-rwxr-xr-xscripts/dynamic-dns/vyatta-dynamic-dns.pl18
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/dynamic-dns/vyatta-dynamic-dns.pl b/scripts/dynamic-dns/vyatta-dynamic-dns.pl
index 83206253..e8aedae8 100755
--- a/scripts/dynamic-dns/vyatta-dynamic-dns.pl
+++ b/scripts/dynamic-dns/vyatta-dynamic-dns.pl
@@ -136,6 +136,24 @@ sub dynamicdns_get_values {
}
}
+ my @rfc2136s = $config->listNodes("rfc2136");
+ foreach my $rfc2136 (@rfc2136s) {
+ $config->setLevel("service dns dynamic interface $interface rfc2136 $rfc2136");
+ my $key_file = $config->returnValue("key");
+ my @records = $config->returnValues("record");
+ my $nsserver = $config->returnValue("server");
+ my $ttl = $config->returnValue("ttl");
+ my $zone = $config->returnValue("zone");
+
+ foreach my $record (@records) {
+ $output .= "server=$server\n";
+ $output .= "protocol=nsupdate\n";
+ $output .= "password=$key_file\n";
+ $output .= "ttl=$ttl\n";
+ $output .= "zone=$zone\n";
+ $output .= "$record\n\n";
+ }
+ }
return $output;
}