]> granicus.if.org Git - icinga2/commitdiff
Warn in case of failed conf.d exclusion also on master setup
authorMichael Insel <michael@insel.email>
Thu, 3 May 2018 15:12:06 +0000 (17:12 +0200)
committerMichael Friedrich <michael.friedrich@icinga.com>
Tue, 8 May 2018 14:33:04 +0000 (16:33 +0200)
refs #4508

lib/cli/nodewizardcommand.cpp

index f729685f61f70ff4b43dfbc43063deea129e747a..3398aaa8568cda9cd34a67e5d0fb38949cf4137b 100644 (file)
@@ -633,7 +633,7 @@ wizard_global_zone_loop_start:
 
                if(!NodeUtility::UpdateConfiguration("\"conf.d\"", false, true)) {
                        std::cout << ConsoleColorTag(Console_Bold | Console_ForegroundRed)
-                               << "Failed to disable conf.d inclusion, it may already be disabled."
+                               << "Failed to disable conf.d inclusion, it may already be disabled.\n"
                                << ConsoleColorTag(Console_Normal);
                }
 
@@ -840,7 +840,11 @@ wizard_global_zone_loop_start:
                        << "Disable the inclusion of the conf.d directory...\n"
                        << ConsoleColorTag(Console_Normal);
 
-               NodeUtility::UpdateConfiguration("\"conf.d\"", false, true);
+               if (!NodeUtility::UpdateConfiguration("\"conf.d\"", false, true)) {
+                       std::cout << ConsoleColorTag(Console_Bold | Console_ForegroundRed)
+                               << "Failed to disable conf.d inclusion, it may already be disabled.\n"
+                               << ConsoleColorTag(Console_Normal);
+               }
 
                /* Include api-users.conf */
                String apiUsersFilePath = Application::GetSysconfDir() + "/icinga2/conf.d/api-users.conf";