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