From 7bd42b476fd8d837ad6a5a0ee4255358a53e0dea Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 23 Jan 2015 15:27:43 +0100 Subject: [PATCH] bootstrap: Load setup module in case the setup token exists The web setup may write the config.ini even if it errors. Thus our bootstrap has to load the setup module whenever the setup.token exists. Another approach would to write the config.ini in our web setup at the very end. --- library/Icinga/Application/ApplicationBootstrap.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Application/ApplicationBootstrap.php b/library/Icinga/Application/ApplicationBootstrap.php index 92e97ba39..909431663 100644 --- a/library/Icinga/Application/ApplicationBootstrap.php +++ b/library/Icinga/Application/ApplicationBootstrap.php @@ -401,7 +401,7 @@ abstract class ApplicationBootstrap } /** - * Load the setup module if Icinga Web 2 requires setup + * Load the setup module if Icinga Web 2 requires setup or the setup token exists * * @return $this */ @@ -410,6 +410,9 @@ abstract class ApplicationBootstrap if (! @file_exists($this->config->resolvePath('config.ini'))) { $this->requiresSetup = true; $this->moduleManager->loadModule('setup'); + } elseif ($this->setupTokenExists()) { + // Load setup module but do not require setup + $this->moduleManager->loadModule('setup'); } return $this; }