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:
parent
1c13c24981
commit
e696d57ff2
2 changed files with 5 additions and 2 deletions
|
@ -21,6 +21,9 @@ repository history](https://github.com/ddclient/ddclient/commits/master).
|
||||||
minute.
|
minute.
|
||||||
* The `pid` option is now ignored when ddclient is not daemonized.
|
* The `pid` option is now ignored when ddclient is not daemonized.
|
||||||
* ddclient now gracefully exits when interrupted by Ctrl-C.
|
* 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
|
## 2020-01-08 v3.9.1
|
||||||
|
|
||||||
|
|
4
ddclient
4
ddclient
|
@ -1292,9 +1292,9 @@ sub init_config {
|
||||||
|
|
||||||
## infer the IP strategy if possible
|
## infer the IP strategy if possible
|
||||||
if (!defined($opt{'use'})) {
|
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'} = 'web' if defined($opt{'web'});
|
||||||
|
$opt{'use'} = 'if' if defined($opt{'if'});
|
||||||
|
$opt{'use'} = 'ip' if defined($opt{'ip'});
|
||||||
}
|
}
|
||||||
|
|
||||||
## sanity check
|
## sanity check
|
||||||
|
|
Loading…
Reference in a new issue