From: Michael Friedrich Date: Thu, 25 Jun 2015 11:28:16 +0000 (+0200) Subject: Cli: Still ask for CN in 'node wizard' X-Git-Tag: v2.4.0~561 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e3588b9fb24f25bb6bb264bc574cc162c22ad45;p=icinga2 Cli: Still ask for CN in 'node wizard' refs #9471 --- diff --git a/lib/cli/nodewizardcommand.cpp b/lib/cli/nodewizardcommand.cpp index b9fdfd438..0ac3809e0 100644 --- a/lib/cli/nodewizardcommand.cpp +++ b/lib/cli/nodewizardcommand.cpp @@ -442,9 +442,20 @@ wizard_ticket: } else { /* master setup */ std::cout << ConsoleColorTag(Console_Bold) << "Starting the Master setup routine...\n"; - std::cout << ConsoleColorTag(Console_Bold) << "Checking the 'api' feature...\n"; - String cn = Utility::GetFQDN(); + /* CN */ + std::cout << ConsoleColorTag(Console_Bold) << "Please specifiy the common name" << ConsoleColorTag(Console_Normal) << " (CN) [" << Utility::GetFQDN() << "]: "; + + std::getline(std::cin, answer); + boost::algorithm::to_lower(answer); + + if (answer.empty()) + answer = Utility::GetFQDN(); + + String cn = answer; + cn.Trim(); + + std::cout << ConsoleColorTag(Console_Normal) << "Checking the 'api' feature...\n"; if (FeatureUtility::CheckFeatureDisabled("api")) { std::cout << ConsoleColorTag(Console_Bold) << "'api' feature not enabled, running 'api setup' now.\n";