]> granicus.if.org Git - icinga2/commitdiff
Cli: Still ask for CN in 'node wizard'
authorMichael Friedrich <michael.friedrich@netways.de>
Thu, 25 Jun 2015 11:28:16 +0000 (13:28 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Thu, 25 Jun 2015 11:28:16 +0000 (13:28 +0200)
refs #9471

lib/cli/nodewizardcommand.cpp

index b9fdfd43894c747e81e624d87cbbd16793442b08..0ac3809e06474618c5199cd61b0ca50715f951f7 100644 (file)
@@ -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";