Before, if a non-`undef` value was in `%recap` and the corresponding
value in `%config` became `undef`, the `%recap` value would remain
untouched. Now it is deleted to match `%config`.
Also, any `%recap` values without a corresponding recap variable
declaration are deleted.
Currently the semantics of recap variables are that values are updated
in `%config` and propagate to `%recap`. Before this commit,
`warned-min-interval` and `warned-min-error-interval` were set in
`%recap` instead of `%config`, meaning if they followed the semantics
they would be overwritten or deleted when synced with `%config`. Now
the values are set in `%config` to match the behavior of other recap
variables.
When a legacy protocol implementation returns, move its `status` and
`ip` results to the new `status-ipv4` and `ipv4` (or `status-ipv6` and
`ipv6`) properties.
Also remove the now-unused `status` variable definition, and remove
`ip` from the recap.
Rather than check whether `use`, `usev4`, or `usev6` is a non-disabled
value, check that `wantip`, `wantipv4`, or `wantipv6` is a defined
value. This is preparation for removing the `status` variable in a
future commit.
* Delete values from `$config{$h}` and `$recap{$h}` when resetting
values (as opposed to setting a falsy value).
* Delete values from `$config{$h}` and `$recap{$h}` when they are no
longer needed.
This is mostly done to improve the tests in `t/update_nics.pl`.
Now that the default changes depending on `usev4` and `usev6`, this is
no longer necessary. Removing it simplifies the code a bit and makes
the behavior of unit tests match the overall behavior a bit better.
This is mostly to simplify tests, but it also improves readability.
The infrastructure changes in this commit also make it possible to
introduce a new `url` variable that defaults to `opt('server', $h)`
concatenated with `opt('script', $h)` so that we can start migrating
away from those user-unfriendly variables.
This doesn't add any new command-line arguments, but it does mean that
a new command-line argument can be added for any variable, not just
those in `$variables{'global-defaults'}`, and its value will be copied
to `%globals`.
My main motivation for this commit is to make it possible to remove
the redundant variable declarations between
`$variables{'global-defaults'}` and
`$variables{'protocol-common-defaults'}`.