Merge pull request #6647 from Icinga/bugfix/node-setup-master-accept-config-commands

node setup: always respect --accept-config and --accept-commands
This commit is contained in:
Michael Friedrich 2018-10-08 13:12:02 +02:00 committed by GitHub
commit be8504a738
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 6 deletions

View File

@ -121,12 +121,6 @@ int NodeSetupCommand::SetupMaster(const boost::program_options::variables_map& v
if (vm.count("trustedcert"))
Log(LogWarning, "cli", "Master for Node setup: Ignoring --trustedcert");
if (vm.count("accept-config"))
Log(LogWarning, "cli", "Master for Node setup: Ignoring --accept-config");
if (vm.count("accept-commands"))
Log(LogWarning, "cli", "Master for Node setup: Ignoring --accept-commands");
String cn = Utility::GetFQDN();
if (vm.count("cn"))
@ -212,6 +206,18 @@ int NodeSetupCommand::SetupMaster(const boost::program_options::variables_map& v
fp << " bind_port = " << tokens[1] << "\n";
}
fp << "\n";
if (vm.count("accept-config"))
fp << " accept_config = true\n";
else
fp << " accept_config = false\n";
if (vm.count("accept-commands"))
fp << " accept_commands = true\n";
else
fp << " accept_commands = false\n";
fp << "\n"
<< " ticket_salt = TicketSalt\n"
<< "}\n";