From 3e3588b9fb24f25bb6bb264bc574cc162c22ad45 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 25 Jun 2015 13:28:16 +0200 Subject: [PATCH] Cli: Still ask for CN in 'node wizard' refs #9471 --- lib/cli/nodewizardcommand.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) 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"; -- 2.40.0