Merge pull request #131 from rhansen/redundant-daemon-opt-processing

Delete redundant `$opt{'daemon'}` processing
This commit is contained in:
Sandro 2020-05-29 03:53:27 +02:00 committed by GitHub
commit 6a48fbca42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -866,7 +866,7 @@ do {
fatal("invalid argument '-use %s'; possible values are:\n%s", $opt{'use'}, join("\n", ip_strategies_usage())) fatal("invalid argument '-use %s'; possible values are:\n%s", $opt{'use'}, join("\n", ip_strategies_usage()))
unless exists $ip_strategies{lc opt('use')}; unless exists $ip_strategies{lc opt('use')};
$daemon = $opt{'daemon'}; $daemon = opt('daemon');
$daemon = 0 if opt('force'); $daemon = 0 if opt('force');
update_nics(); update_nics();
@ -1281,13 +1281,6 @@ sub init_config {
$opt{'timeout'} = 0 if opt('timeout') < 0; $opt{'timeout'} = 0 if opt('timeout') < 0;
## only set $opt{'daemon'} if it has been explicitly passed in
if (define($opt{'daemon'}, $globals{'daemon'}, 0)) {
$opt{'daemon'} = interval(opt('daemon'));
$opt{'daemon'} = minimum('daemon')
if ($opt{'daemon'} < minimum('daemon'));
}
## define or modify host options specified on the command-line ## define or modify host options specified on the command-line
if (exists $opt{'options'} && defined $opt{'options'}) { if (exists $opt{'options'} && defined $opt{'options'}) {
## collect cmdline configuration options. ## collect cmdline configuration options.