Export active dsu slot to system prop
The prop can be consumed by init scripts to do customized setup: on property:ro.gsid.dsu_slot=oemtest # Do setup for test on property:ro.gsid.dsu_slot=oemdemo # Do setup for demo Bug: 277691885 Test: m Change-Id: I7bd78b9ba31021b27d57c6f092dad5d7ebf6e59b Merged-In: I7bd78b9ba31021b27d57c6f092dad5d7ebf6e59b Cherry-picked from aosp/2588465
This commit is contained in:
parent
301026fad9
commit
ce09cdff62
1 changed files with 6 additions and 0 deletions
|
@ -1043,6 +1043,12 @@ int SecondStageMain(int argc, char** argv) {
|
|||
SetProperty(gsi::kGsiBootedProp, is_running);
|
||||
auto is_installed = android::gsi::IsGsiInstalled() ? "1" : "0";
|
||||
SetProperty(gsi::kGsiInstalledProp, is_installed);
|
||||
if (android::gsi::IsGsiRunning()) {
|
||||
std::string dsu_slot;
|
||||
if (android::gsi::GetActiveDsu(&dsu_slot)) {
|
||||
SetProperty(gsi::kDsuSlotProp, dsu_slot);
|
||||
}
|
||||
}
|
||||
|
||||
am.QueueBuiltinAction(SetupCgroupsAction, "SetupCgroups");
|
||||
am.QueueBuiltinAction(SetKptrRestrictAction, "SetKptrRestrict");
|
||||
|
|
Loading…
Reference in a new issue