Prefer ip over if over web when inferring use

If the user passed `-ip` they almost certainly want to use it, even if
they also passed `-if` and `-web`.

Similarly, if the user passed `-if` they almost certainly want to use
it even if they also passed `-web`.
This commit is contained in:
Richard Hansen 2020-06-04 18:23:17 -04:00
parent 1c13c24981
commit e696d57ff2
2 changed files with 5 additions and 2 deletions

View file

@ -21,6 +21,9 @@ repository history](https://github.com/ddclient/ddclient/commits/master).
minute.
* The `pid` option is now ignored when ddclient is not daemonized.
* ddclient now gracefully exits when interrupted by Ctrl-C.
* The way ddclient chooses the default for the `use` option has changed.
Rather than rely on the default, users should explicitly set the `use`
option.
## 2020-01-08 v3.9.1

View file

@ -1292,9 +1292,9 @@ sub init_config {
## infer the IP strategy if possible
if (!defined($opt{'use'})) {
$opt{'use'} = 'ip' if defined($opt{'ip'});
$opt{'use'} = 'if' if defined($opt{'if'});
$opt{'use'} = 'web' if defined($opt{'web'});
$opt{'use'} = 'if' if defined($opt{'if'});
$opt{'use'} = 'ip' if defined($opt{'ip'});
}
## sanity check