Index: sources/storage/StorageGlobals.cpp =================================================================== diff -u -r80b5e8f1ebb90c03c37d90d90cd2da3bd95d6803 -r8d5fe7d63e3d86e9d89d5f824347d34479e4e9ec --- sources/storage/StorageGlobals.cpp (.../StorageGlobals.cpp) (revision 80b5e8f1ebb90c03c37d90d90cd2da3bd95d6803) +++ sources/storage/StorageGlobals.cpp (.../StorageGlobals.cpp) (revision 8d5fe7d63e3d86e9d89d5f824347d34479e4e9ec) @@ -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] @@ -114,15 +115,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