From b9ec2d42a301255af22990c9509bb9462482eded Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sat, 17 Aug 2024 00:50:45 -0400 Subject: [PATCH] Remove the (broken and unused?) `--retry` option --- ChangeLog.md | 2 ++ ddclient.in | 14 -------------- sample-etc_cron.d_ddclient | 4 ---- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index b8cf192..68db4e9 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -48,6 +48,8 @@ repository history](https://github.com/ddclient/ddclient/commits/master). removed. [#716](https://github.com/ddclient/ddclient/pull/716) * `googledomains`: Support was removed because the service shut down. [#716](https://github.com/ddclient/ddclient/pull/716) + * The `--retry` option was removed. + [#732](https://github.com/ddclient/ddclient/pull/732) ### New features diff --git a/ddclient.in b/ddclient.in index 88e4c5d..6236c94 100755 --- a/ddclient.in +++ b/ddclient.in @@ -599,7 +599,6 @@ our %variables = ( 'cmdv6' => setv(T_PROG, 0, 0, undef, undef), 'timeout' => setv(T_DELAY, 0, 0, interval('120s'), interval('120s')), - 'retry' => setv(T_BOOL, 0, 0, 0, undef), 'force' => setv(T_BOOL, 0, 0, 0, undef), 'ssl' => setv(T_BOOL, 0, 0, 1, undef), 'syslog' => setv(T_BOOL, 0, 0, 0, undef), @@ -1221,7 +1220,6 @@ my @opt = ( ["ssl_ca_file", "=s", "--ssl_ca_file= : look at for certificates of trusted certificate authorities (default: auto-detect)"], ["fw-ssl-validate", "!", "--{no}fw-ssl-validate : Validate SSL certificate when retrieving IP address from firewall"], ["web-ssl-validate", "!", "--{no}web-ssl-validate : Validate SSL certificate when retrieving IP address from web"], - ["retry", "!", "--{no}retry : Initiate a one-time update attempt for hosts that have not been successfully updated (according to the cache). Incompatible with '--daemon'"], ["force", "!", "--{no}force : force an update even if the update may be unnecessary"], ["timeout", "=i", "--timeout= : when fetching a URL, wait at most seconds for a response"], ["syslog", "!", "--{no}syslog : log messages to syslog"], @@ -1937,23 +1935,11 @@ sub init_config { # if they are not associated with a host via `--host=` or `--options=host=`)? } - ## sanity check - if (defined(opt('host')) && opt('retry')) { - fatal("options --retry and --host (or --option host=..) are mutually exclusive"); - } - fatal("options --retry and --daemon cannot be used together") if (opt('retry') && opt('daemon')); - ## determine hosts to update (those on the cmd-line, config-file, or failed in recap) my @hosts = keys %config; if (opt('host')) { @hosts = split_by_comma($opt{'host'}); } - # TODO: The first two times init_config() is called the cache file has not been read yet, so - # this will not filter out any hosts and thus updates will not be limited to non-good hosts as - # intended. - if (opt('retry')) { - @hosts = grep(($recap{$_}{'status'} // '') ne 'good', keys(%recap)); - } ## remove any other hosts my %hosts; diff --git a/sample-etc_cron.d_ddclient b/sample-etc_cron.d_ddclient index b081832..6019805 100644 --- a/sample-etc_cron.d_ddclient +++ b/sample-etc_cron.d_ddclient @@ -10,7 +10,3 @@ ## force an update twice a month (only if you are not using daemon-mode) ## ## 30 23 1,15 * * root /usr/bin/ddclient -daemon=0 -syslog -quiet -force -###################################################################### -## retry failed updates every hour (only if you are not using daemon-mode) -## -## 0 * * * * root /usr/bin/ddclient -daemon=0 -syslog -quiet retry