From 8949b079e1d88ecfeddc420a17b63140ae2ba01a Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 2 Apr 2021 13:11:16 +0200 Subject: [PATCH] [users] Fix autologin-setting from config file SEE #1668 --- src/modules/users/Config.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/modules/users/Config.cpp b/src/modules/users/Config.cpp index be87ad93b..2954b0381 100644 --- a/src/modules/users/Config.cpp +++ b/src/modules/users/Config.cpp @@ -820,7 +820,19 @@ Config::setConfigurationMap( const QVariantMap& configurationMap ) m_hostNameActions = getHostNameActions( configurationMap ); setConfigurationDefaultGroups( configurationMap, m_defaultGroups ); - m_doAutoLogin = CalamaresUtils::getBool( configurationMap, "doAutoLogin", false ); + + // Renaming of Autologin -> AutoLogin in 4ffa79d4cf also affected + // configuration keys, which was not intended. Accept both. + const auto oldKey = QStringLiteral( "doAutologin" ); + const auto newKey = QStringLiteral( "doAutoLogin" ); + if ( configurationMap.contains( oldKey ) ) + { + m_doAutoLogin = CalamaresUtils::getBool( configurationMap, oldKey, false ); + } + else + { + m_doAutoLogin = CalamaresUtils::getBool( configurationMap, newKey, false ); + } m_writeRootPassword = CalamaresUtils::getBool( configurationMap, "setRootPassword", true ); Calamares::JobQueue::instance()->globalStorage()->insert( "setRootPassword", m_writeRootPassword );