From 30a7c5ad78e9697526e74f28eea0885b33e93782 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Fri, 19 Jul 2024 01:47:27 -0400 Subject: [PATCH] dyndns2: Delete obsolete `custom` and `static` options says: > We will accept these parameters without generating error messages: > > * `system`, previously used to identify update type --- ChangeLog.md | 3 +++ ddclient.conf.in | 20 -------------------- ddclient.in | 20 ++------------------ 3 files changed, 5 insertions(+), 38 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index b531974..f703f3a 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -38,6 +38,9 @@ repository history](https://github.com/ddclient/ddclient/commits/master). documentation does not mention such responses, and the code to handle them, untouched since at least 2006, is believed to be obsolete. [#709](https://github.com/ddclient/ddclient/pull/709) + * `dyndns2`: The obsolete `static` and `custom` options have been removed. + Setting the options may produce a warning. + [#709](https://github.com/ddclient/ddclient/pull/709) ### New features diff --git a/ddclient.conf.in b/ddclient.conf.in index 8a336ac..1c7ae35 100644 --- a/ddclient.conf.in +++ b/ddclient.conf.in @@ -81,26 +81,6 @@ pid=@runstatedir@/ddclient.pid # record PID in file. # protocol=dyndns2 \ # your-dynamic-host.dyndns.org -## -## dyndns.org static addresses -## -## (supports variables: wildcard,mx,backupmx) -## -# static=yes, \ -# server=members.dyndns.org, \ -# protocol=dyndns2 \ -# your-static-host.dyndns.org - -## -## dyndns.org custom addresses -## -## (supports variables: wildcard,mx,backupmx) -## -# custom=yes, \ -# server=members.dyndns.org, \ -# protocol=dyndns2 \ -# your-domain.top-level,your-other-domain.top-level - ## ## ZoneEdit (zoneedit.com) ## diff --git a/ddclient.in b/ddclient.in index d60f87d..332f086 100755 --- a/ddclient.in +++ b/ddclient.in @@ -709,7 +709,6 @@ our %variables = ( 'dyndns-common-defaults' => { 'backupmx' => setv(T_BOOL, 0, 1, 0, undef), 'mx' => setv(T_OFQDN, 0, 1, undef, undef), - 'static' => setv(T_BOOL, 0, 1, 0, undef), 'wildcard' => setv(T_BOOL, 0, 1, 0, undef), }, ); @@ -848,6 +847,7 @@ our %protocols = ( 'variables' => { %{$variables{'protocol-common-defaults'}}, %{$variables{'dyndns-common-defaults'}}, + 'static' => setv(T_BOOL, 0, 1, 0, undef), }, }, 'dyndns2' => { @@ -857,7 +857,6 @@ our %protocols = ( 'variables' => { %{$variables{'protocol-common-defaults'}}, %{$variables{'dyndns-common-defaults'}}, - 'custom' => setv(T_BOOL, 0, 1, 0, undef), 'script' => setv(T_STRING, 0, 1, '/nic/update', undef), }, }, @@ -4015,8 +4014,6 @@ Configuration variables applicable to the 'dyndns2' protocol are: server=fqdn.of.service ## defaults to members.dyndns.org script=/path/to/script ## defaults to /nic/update backupmx=no|yes ## indicates that this host is the primary MX for the domain. - static=no|yes ## indicates that this host has a static IP address. - custom=no|yes ## indicates that this host is a 'custom' top-level domain name. mx=any.host.domain ## a host MX'ing for this host definition. wildcard=no|yes ## add a DNS wildcard CNAME record that points to login=service-login ## login name and password registered with the service @@ -4065,13 +4062,11 @@ sub nic_dyndns2_update { ); my @group_by_attrs = qw( backupmx - custom login mx password script server - static wantipv4 wantipv6 wildcard @@ -4086,18 +4081,7 @@ sub nic_dyndns2_update { delete $config{$_}{'wantipv6'} for @hosts; info("$hosts: setting IPv4 address to $ipv4") if $ipv4; info("$hosts: setting IPv6 address to $ipv6") if $ipv6; - my $url = "$groupcfg{'server'}$groupcfg{'script'}?system="; - if ($groupcfg{'custom'}) { - warning("$hosts: 'custom' and 'static' may not be used together ('static' ignored)") - if $groupcfg{'static'}; - $url .= 'custom'; - } elsif ($groupcfg{'static'}) { - $url .= 'statdns'; - } else { - $url .= 'dyndns'; - } - $url .= "&hostname=$hosts"; - $url .= "&myip="; + my $url = "$groupcfg{'server'}$groupcfg{'script'}?hostname=$hosts&myip="; $url .= $ipv4 if $ipv4; if ($ipv6) { $url .= "," if $ipv4;