From 498df7579010b8ec8e1c50fbded97b4d1802e953 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Tue, 14 May 2024 17:33:35 -0400 Subject: [PATCH 1/3] Fix "no hosts to update" warning condition --- ddclient.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddclient.in b/ddclient.in index 9d40743..d21d7c5 100755 --- a/ddclient.in +++ b/ddclient.in @@ -1283,7 +1283,7 @@ sub main { $result = 0; } elsif (!scalar(%config)) { - warning("no hosts to update.") unless !opt('quiet') || opt('verbose') || !$daemon; + warning("no hosts to update.") if !opt('quiet'); $result = 1; } else { From 2764cd8a10b1ffbe2d8680783e0f289068f92a15 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Tue, 14 May 2024 17:59:29 -0400 Subject: [PATCH 2/3] Clarify what `--retry` does --- ddclient.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddclient.in b/ddclient.in index d21d7c5..9e4ed55 100755 --- a/ddclient.in +++ b/ddclient.in @@ -1168,7 +1168,7 @@ 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 : retry failed updates"], + ["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"], From 066b19af8f1aff6c3dc49f15add8df55dad0d7ba Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Tue, 14 May 2024 17:59:42 -0400 Subject: [PATCH 3/3] Error out if `--daemon` and `--retry` are both specified --- ddclient.in | 1 + 1 file changed, 1 insertion(+) diff --git a/ddclient.in b/ddclient.in index 9e4ed55..ecb7820 100755 --- a/ddclient.in +++ b/ddclient.in @@ -1903,6 +1903,7 @@ sub init_config { if (defined $opt{'host'} && defined $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 cached) my @hosts = keys %config;