Delete no-effect option normalization
The alternative is to "fix" the code to match the original intention, but users haven't been complaining so it's better to avoid the risk of introducing a new bug in the fix.
This commit is contained in:
parent
7fde55c188
commit
478f517d53
1 changed files with 0 additions and 36 deletions
36
ddclient.in
36
ddclient.in
|
@ -1869,42 +1869,6 @@ sub init_config {
|
||||||
##
|
##
|
||||||
$opt{'quiet'} = 0 if opt('verbose');
|
$opt{'quiet'} = 0 if opt('verbose');
|
||||||
|
|
||||||
## infer the IP strategy if possible
|
|
||||||
if (!$opt{'use'}) {
|
|
||||||
# TODO: I don't think these have any effect. The value is not copied into the
|
|
||||||
# host-specific %config settings, and $config{$h}{use} is initialized to the variable
|
|
||||||
# default ("ip"), not set to undef, so opt() won't fall back to this.
|
|
||||||
$opt{'use'} = 'web' if ($opt{'web'});
|
|
||||||
$opt{'use'} = 'if' if ($opt{'if'});
|
|
||||||
$opt{'use'} = 'ip' if ($opt{'ip'});
|
|
||||||
}
|
|
||||||
## infer the IPv4 strategy if possible
|
|
||||||
if (!$opt{'usev4'}) {
|
|
||||||
# TODO: I don't think these have any effect. The value is not copied into the
|
|
||||||
# host-specific %config settings, and $config{$h}{usev4} is initialized to the variable
|
|
||||||
# default ("disabled"), not set to undef, so opt() won't fall back to this.
|
|
||||||
$opt{'usev4'} = 'webv4' if ($opt{'webv4'});
|
|
||||||
$opt{'usev4'} = 'ifv4' if ($opt{'ifv4'});
|
|
||||||
$opt{'usev4'} = 'ipv4' if ($opt{'ipv4'});
|
|
||||||
}
|
|
||||||
## infer the IPv6 strategy if possible
|
|
||||||
if (!$opt{'usev6'}) {
|
|
||||||
# TODO: I don't think these have any effect. The value is not copied into the
|
|
||||||
# host-specific %config settings, and $config{$h}{usev6} is initialized to the variable
|
|
||||||
# default ("disabled"), not set to undef, so opt() won't fall back to this.
|
|
||||||
$opt{'usev6'} = 'webv6' if ($opt{'webv6'});
|
|
||||||
$opt{'usev6'} = 'ifv6' if ($opt{'ifv6'});
|
|
||||||
$opt{'usev6'} = 'ipv6' if ($opt{'ipv6'});
|
|
||||||
}
|
|
||||||
|
|
||||||
## sanity check
|
|
||||||
# TODO: I don't think these have any effect. The values are not copied into the host-specific
|
|
||||||
# %config settings, and $config{$h}{$opt} is initialized to the non-undef variable default so
|
|
||||||
# opt() won't fall back to these.
|
|
||||||
$opt{'max-interval'} = min(interval(opt('max-interval')), interval(default('max-interval')));
|
|
||||||
$opt{'min-interval'} = max(interval(opt('min-interval')), interval(default('min-interval')));
|
|
||||||
$opt{'min-error-interval'} = max(interval(opt('min-error-interval')), interval(default('min-error-interval')));
|
|
||||||
|
|
||||||
## define or modify host options specified on the command-line
|
## define or modify host options specified on the command-line
|
||||||
if (defined($opt{'options'})) {
|
if (defined($opt{'options'})) {
|
||||||
# TODO: Perhaps the --options argument should be processed like the contents of the config
|
# TODO: Perhaps the --options argument should be processed like the contents of the config
|
||||||
|
|
Loading…
Reference in a new issue