Index: sources/ApplicationController.cpp =================================================================== diff -u -r611bbf4dcba67768db87cf30f21fd2db788f677d -ra62e7e1235c3ff3100c380aeb70915955cd04d77 --- sources/ApplicationController.cpp (.../ApplicationController.cpp) (revision 611bbf4dcba67768db87cf30f21fd2db788f677d) +++ sources/ApplicationController.cpp (.../ApplicationController.cpp) (revision a62e7e1235c3ff3100c380aeb70915955cd04d77) @@ -623,12 +623,12 @@ void ApplicationController::onPOSTDone(bool /*vPass*/) { LOG_DEBUG("ApplicationPOST Done"); - /// in manufacturing mode the configurations must reside in /root/home + /// in manufacturing or update mode the configurations must reside in /root/home /// therefore the settings can be initialized after POST. #ifdef BUILD_FOR_DESKTOP initSettings(); #else - if ( gEnableManufacturing ) initSettings(); + if ( gEnableManufacturing || gEnableUpdating ) initSettings(); #endif } Index: sources/ApplicationController.h =================================================================== diff -u -r611bbf4dcba67768db87cf30f21fd2db788f677d -ra62e7e1235c3ff3100c380aeb70915955cd04d77 --- sources/ApplicationController.h (.../ApplicationController.h) (revision 611bbf4dcba67768db87cf30f21fd2db788f677d) +++ sources/ApplicationController.h (.../ApplicationController.h) (revision a62e7e1235c3ff3100c380aeb70915955cd04d77) @@ -164,7 +164,7 @@ /*! * \brief didPOSTPass * \details This signal will be emitted when UI is done with the POST and will let other layers to know the result. - * As an example the Manufacturing will not start if the POST failed since it needs POST info for the Encrypted partition. + * As an example the Manufacturing or update will not start if the POST failed since it needs POST info for the Encrypted partition. * \param vPass - true if passed. */ void didPOSTPass (bool vPass); @@ -190,6 +190,7 @@ ACTION_RECEIVE_MODEL_BRIDGE_DEFINITIONS ACTION_RECEIVE_PRIVATE_SLOT_NOEMIT(UIPostFinalResultHDRequestData) { + onPOSTDone(_post.isDone()); emit didActionReceive(vData); } Index: sources/storage/Settings.h =================================================================== diff -u -r611bbf4dcba67768db87cf30f21fd2db788f677d -ra62e7e1235c3ff3100c380aeb70915955cd04d77 --- sources/storage/Settings.h (.../Settings.h) (revision 611bbf4dcba67768db87cf30f21fd2db788f677d) +++ sources/storage/Settings.h (.../Settings.h) (revision a62e7e1235c3ff3100c380aeb70915955cd04d77) @@ -129,7 +129,7 @@ int read (); int save (const QString &vCategory, const QString &vGroup, const QString &vKey, const QString &vValue); - int configurationsMove ( QString *vMessage = nullptr); + int configurationsMove (QString *vMessage = nullptr, bool vIsUpdate = false); int configurationsPOST (Location_Enum vLoc = Location_Enum::eSecured) { Q_UNUSED(vLoc); return true; } static QString category(Category_Enum vCategory) { Index: sources/storage/StorageGlobals.cpp =================================================================== diff -u -r611bbf4dcba67768db87cf30f21fd2db788f677d -ra62e7e1235c3ff3100c380aeb70915955cd04d77 --- sources/storage/StorageGlobals.cpp (.../StorageGlobals.cpp) (revision 611bbf4dcba67768db87cf30f21fd2db788f677d) +++ sources/storage/StorageGlobals.cpp (.../StorageGlobals.cpp) (revision a62e7e1235c3ff3100c380aeb70915955cd04d77) @@ -20,6 +20,7 @@ #include "StorageGlobals.h" extern bool gEnableManufacturing ; +extern bool gEnableUpdating ; extern bool gUseRootHome ; /*! @@ -71,12 +72,12 @@ // Settings static bool settings_secured = false; - const char *Settings_Path () { return gUseRootHome ? Settings_Path_Init : ( gEnableManufacturing ? ( settings_secured ? Settings_Path_Name: Settings_Path_Init ) : Settings_Path_Name ); } + const char *Settings_Path () { return gUseRootHome ? Settings_Path_Init : ( ( gEnableManufacturing || gEnableUpdating ) ? ( settings_secured ? Settings_Path_Name: Settings_Path_Init ) : Settings_Path_Name ); } void Settings_Secured() { settings_secured = true; } #ifdef BUILD_FOR_TARGET //WARNING: This has to match with the crypt_setup.sh - const char *Settings_Path_Init = "/home/root/.config/"; // this is the manufacturing setup and the user is root. + const char *Settings_Path_Init = "/home/root/.config/"; // this is the manufacturing or update setup and the user is root. const char *Settings_Path_Name = "/var/configurations/"; #else // should be in the project application folder. [is tracking by git] @@ -115,15 +116,10 @@ // Scripts const QString Scripts_Path_Name() { #ifdef BUILD_FOR_TARGET - //TODO The manufacturing mode has to run as root - // after the lockdown.sh ran there would be no root user access - // and I am not sure how we reenable the root ssh - // and if it is a security risk to give denali access to sshd_config to enable the root ssh within UI App - - // lockdown script suppose to be the last thing to do, + // lockdown script suppose to be the last thing to run, // and it is the lockdown.sh script which moves the scripts from root to denali home folder, - // therefore in manufacturing mode we are still running as root. - return QCoreApplication::applicationDirPath() + (gEnableManufacturing ? "/scripts/" : "/scripts/"); + // therefore in manufacturing or update mode we are still running scripts as root. + return QCoreApplication::applicationDirPath() + ( ( gEnableManufacturing || gEnableUpdating )? "/scripts/" : "/scripts/"); #else return "/home/denali/Projects/application/scripts/"; #endif