From a4062066ca5699b7f7be41096b39a80cea6091d1 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 23 Oct 2014 04:38:54 +0200 Subject: [PATCH] Remove unused code refs #7423 --- lib/cli/agentsetupcommand.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/cli/agentsetupcommand.cpp b/lib/cli/agentsetupcommand.cpp index b56ffa2b0..6034934e5 100644 --- a/lib/cli/agentsetupcommand.cpp +++ b/lib/cli/agentsetupcommand.cpp @@ -60,7 +60,7 @@ void AgentSetupCommand::InitParameters(boost::program_options::options_descripti ("zone", po::value(), "The name of the local zone") ("master_zone", po::value(), "The name of the master zone") ("master_host", po::value(), "The name of the master host for auto-signing the csr") - ("endpoint", po::value >(), "Connect to remote endpoint; syntax: cn,host,port") + ("endpoint", po::value >(), "Connect to remote endpoint; syntax: cn[,host,port]") ("listen", po::value(), "Listen on host,port") ("ticket", po::value(), "Generated ticket number for this request") ("trustedcert", po::value(), "Trusted master certificate file") @@ -320,14 +320,7 @@ int AgentSetupCommand::SetupAgent(const boost::program_options::variables_map& v Log(LogInformation, "cli", "Generating zone and object configuration."); - std::vector endpoints; - if (vm.count("endpoint")) { - endpoints = vm["endpoint"].as >(); - } else { - endpoints.push_back("master-noconnect"); //no endpoint means no connection attempt. fake name required for master endpoint name - } - - AgentUtility::GenerateAgentIcingaConfig(endpoints, cn); + AgentUtility::GenerateAgentIcingaConfig(vm["endpoint"].as >(), cn); /* update constants.conf with NodeName = CN */ if (cn != Utility::GetFQDN()) {