From: Michael Tremer Date: Tue, 8 Jul 2014 13:41:23 +0000 (+0200) Subject: ddns.cgi: Add support for keys with nsupdate. X-Git-Tag: v2.15-core80~62^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3c781f637532551f4833799b567e993ececfd56a;p=ipfire-2.x.git ddns.cgi: Add support for keys with nsupdate. --- diff --git a/html/cgi-bin/ddns.cgi b/html/cgi-bin/ddns.cgi index a12ac00a2c..30e6fcf4d0 100644 --- a/html/cgi-bin/ddns.cgi +++ b/html/cgi-bin/ddns.cgi @@ -659,12 +659,20 @@ sub GenerateDDNSConfigFile { } elsif ($provider eq "freedns.afraid.org" && $password eq "") { $use_token = 1; $password = $username; + + # Handle keys for nsupdate + } elsif (($provider eq "nsupdate") && $username && $password) { + print FILE "key = $username\n"; + print FILE "secret = $password\n"; + + $username = ""; + $password = ""; } # Write auth details. if ($use_token) { print FILE "token = $password\n"; - } else { + } elsif ($username && $password) { print FILE "username = $username\n"; print FILE "password = $password\n"; }