]> granicus.if.org Git - icinga2/commitdiff
Make node wizard only accept y/Y and n/N
authorJean-Marcel Flach <jean-marcel.flach@netways.de>
Tue, 31 Mar 2015 07:28:03 +0000 (09:28 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Mon, 20 Apr 2015 06:54:39 +0000 (08:54 +0200)
fixes #8917

lib/cli/nodewizardcommand.cpp

index 970bd04b55f61e1b8a0f345d763096bbe22e9901..dde58e0fa2778bd05d5120fa1586fe0d6de618d4 100644 (file)
@@ -193,7 +193,7 @@ wizard_endpoint_loop_start:
 
                String choice = answer;
 
-               if (choice.Contains("y") || choice.Contains("j"))
+               if (choice.Contains("y"))
                        goto wizard_endpoint_loop_start;
 
                std::cout << ConsoleColorTag(Console_Bold) << "Please specify the master connection for CSR auto-signing" << ConsoleColorTag(Console_Normal) << " (defaults to master endpoint host):\n";
@@ -341,14 +341,14 @@ wizard_ticket:
                boost::algorithm::to_lower(answer);
                choice = answer;
 
-               String accept_config = (choice.Contains("y") || choice.Contains("j")) ? "true" : "false";
+               String accept_config = choice.Contains("y") ? "true" : "false";
 
                std::cout << ConsoleColorTag(Console_Bold) << "Accept commands from master?" << ConsoleColorTag(Console_Normal) << " [y/N]: ";
                std::getline(std::cin, answer);
                boost::algorithm::to_lower(answer);
                choice = answer;
 
-               String accept_commands = (choice.Contains("y") || choice.Contains("j")) ? "true" : "false";
+               String accept_commands = choice.Contains("y") ? "true" : "false";
 
                /* disable the notifications feature on client nodes */
                Log(LogInformation, "cli", "Disabling the Notification feature.");