Commit graph

1090 commits

Author SHA1 Message Date
Richard Hansen
01d2db06c1 Invert conditions for readability 2024-07-11 00:18:27 -04:00
Richard Hansen
6e7a4fb460 Split subtest into two subtests
This makes it easier to debug failures.
2024-07-11 00:18:27 -04:00
Richard Hansen
7b6f640c9b ci: Remove Red Hat UBI 7
UBI 7 is at end of maintenance and can't run newer versions of node
used by some workflows.
2024-07-11 00:15:34 -04:00
Richard Hansen
ab9ac65f46
Merge pull request #694 from rhansen/vars
More variable fixes
2024-06-29 04:18:57 -04:00
Richard Hansen
f5b369a7ef Fix undef warning when encountering an unset but required var
This fixes a bug probably introduced in commit
b8a0a26441
2024-06-29 04:14:57 -04:00
Richard Hansen
89c84f9f07 Ignore (with warning) unknown vars in --options 2024-06-29 04:14:35 -04:00
Richard Hansen
1f31b0e570 Prevent autovivification of empty definitions for unknown variables 2024-06-29 04:14:35 -04:00
Richard Hansen
d8317a730d Fix die that should be return undef
I got ahead of myself -- I intend to replace `return undef` with `die`
in a future commit, and somehow this one jumped the gun.

This fixes a bug introduced in commit
eab72ef6d7
2024-06-29 04:14:31 -04:00
Richard Hansen
04bdd68415 Always set the host variable
The `host` variable is required, so always set it to avoid error
messages when validating the host configuration.
2024-06-29 04:14:02 -04:00
Richard Hansen
be3c2060eb Fix undefined hash reference warning
This fixes a bug introduced in commit
5e3e10d32e

For some reason Perl is OK with:

    my $x = undef;
    my @k = keys(%$x);  # empty list, no warnings

but not:

    my $x = undef;
    my %h = %$x;
    my @k = keys(%h);
2024-06-29 04:13:57 -04:00
Richard Hansen
de39ac7bcc Fix undef warning when daemon is unset
This fixes a bug introduced in commit
88eb2ed4fe
2024-06-29 03:10:51 -04:00
Richard Hansen
ae7a9dce2a Fix variable name typo
This fixes a bug introduced in commit
b154d8ef98
2024-06-29 03:10:51 -04:00
Richard Hansen
76900c708c
Merge pull request #693 from rhansen/vars
Variable fixes: required vs. optional, default values
2024-06-28 16:18:26 -04:00
Richard Hansen
49f5551764 Add variable default value tests 2024-06-28 15:53:40 -04:00
Richard Hansen
eab72ef6d7 Require a defined value if the variable is required 2024-06-28 15:53:40 -04:00
Richard Hansen
399f8a8b32 Adjust variable defaults to pass validity checks
Change the default of every variable whose default (non-`undef`)
doesn't pass through `check_value` unmodified.
2024-06-28 15:53:40 -04:00
Richard Hansen
88eb2ed4fe Use undef as the default of truly optional variables 2024-06-28 15:53:39 -04:00
Richard Hansen
ba6a279186 Convert unnecessarily required variables to optional
Users are not required to provide values for these variables; either
the default is reasonable or the variable can be left unset.
2024-06-28 15:53:06 -04:00
Richard Hansen
b8a0a26441 Remove defaults from required variables without sensible defaults
Required variables with defaults don't make sense; remove the default
values on variables that don't have sensible defaults, such as login
and password.
2024-06-28 15:50:35 -04:00
Richard Hansen
be9e305e73 Fix definition of wtime variable 2024-06-28 15:28:44 -04:00
Richard Hansen
e32b9436fb nfsn: Fix type of min-interval variable 2024-06-28 15:28:44 -04:00
Richard Hansen
66bb07450f nfsn: Fix spelling of min-interval variable name 2024-06-28 15:28:44 -04:00
Richard Hansen
5757f7e07d Restore accidentally deleted --fw command-line argument
This was mistakenly deleted in commit
908b728503.
2024-06-27 00:10:35 -04:00
Richard Hansen
f4c4d974d2
Merge pull request #692 from rhansen/infomaniak
`infomaniak` fixes
2024-06-25 22:56:44 -04:00
Richard Hansen
948567c456 infomaniak: Unrequire server setting
The `infomaniak` protocol doesn't use `server`.
2024-06-25 22:53:23 -04:00
Richard Hansen
9ba583175a infomaniak: Fail if the HTTP status code is not 2xx 2024-06-25 22:53:23 -04:00
Richard Hansen
7d99da77cc header_ok: Fail if the reply is falsy 2024-06-25 22:53:23 -04:00
Richard Hansen
8e24c92b1e infomaniak: Fix response parsing 2024-06-25 22:53:23 -04:00
Richard Hansen
d2f0e042f4 infomaniak: Invert condition to improve readability 2024-06-25 22:47:26 -04:00
Richard Hansen
29e86d9a91 infomaniak: Rename variable for readability 2024-06-25 22:47:25 -04:00
Richard Hansen
a5dedeed3c infomaniak: Fix geturl call
* Pass login and password via `login` and `password` options to
    avoid issues with escaping special characters.
  * Don't attempt twice -- if the first attempt fails, the second will
    almost certainly fail as well.  (The two attempted URLs were
    equivalent, differing only in how the login and password were
    passed.)
2024-06-25 22:47:25 -04:00
Richard Hansen
ac9f937c88 infomaniak: Delete unnecessary defined checks
`undef` is falsy so there's no need to check whether the value is
defined.
2024-06-25 22:46:00 -04:00
Richard Hansen
bab9d9483e infomaniak: Move variable declaration to definition 2024-06-25 21:55:46 -04:00
Richard Hansen
134e47b61d infomaniak: Delete unnecessary newlines 2024-06-25 21:50:51 -04:00
Richard Hansen
e0d9bcc36d
Merge pull request #691 from rhansen/fixes
Fix `regfishde` IPv6 support, repeated `infomaniak` force updates, and other minor issues
2024-06-25 03:00:20 -04:00
Richard Hansen
9d49a33ac6 regfishde: Fix IPv6 support 2024-06-25 02:58:09 -04:00
Richard Hansen
0cde2e3f96 infomaniak: Fix mtime update
`mtime` should always be updated whenever the IP address is updated,
otherwise ddclient will keep force updating over and over.
2024-06-25 02:57:42 -04:00
Richard Hansen
61577d29ae njalla: Fix configuration change during update
If the user enabled `quietreply`, it should not become false after the
first update.

Users might not notice a problem because I think ddclient re-reads the
config file before every check.
2024-06-25 02:52:22 -04:00
Richard Hansen
32bf975bfa Fix call to wrong function name with bad --usev6 2024-06-25 02:52:22 -04:00
Richard Hansen
99dfd7f84d Don't assume that --use is defined 2024-06-25 02:51:58 -04:00
Richard Hansen
b154d8ef98 Fix missing v4, v6 variants in recap update
Fixes an oversight when IPv6 support was added.
2024-06-25 02:48:51 -04:00
Richard Hansen
dafde8becb Fix erroneous backupmx recap check for dyndns1, dyndns2 2024-06-25 01:38:43 -04:00
Richard Hansen
7ac6eda7cc Fix missing local use* override in --query 2024-06-25 01:37:47 -04:00
Richard Hansen
c7c8c5f097 Fix usev4, usev6 output for --query 2024-06-25 01:32:27 -04:00
Richard Hansen
27b50a3b93 Fix --usev4=cisco, --usev4=cisco-asa warning messages 2024-06-25 01:29:29 -04:00
Richard Hansen
e1e8d5711a Fix get_ip argument in --query when testing --fw 2024-06-25 01:20:30 -04:00
Richard Hansen
b363fb48a5 Fix string equality check
The `$proto` interpolation wasn't quoted with `\Q` and `\E`, so
metacharacters in `$proto` could break the matching.  Switch from a
regex to an expression to fix the equality check and improve
readability.
2024-06-25 00:50:22 -04:00
Richard Hansen
61539105bd
Merge pull request #689 from rhansen/readability
Readability improvements
2024-06-22 17:32:27 -04:00
Richard Hansen
1be8438c70 Rename updateable to force_update for readability 2024-06-22 03:07:49 -04:00
Richard Hansen
b426b370fd Rename %cache to %recap for readability 2024-06-22 02:48:03 -04:00