init: add ro.boot.init_rc
SoC vendors and ODMs need a way to run different init scripts under different boot modes. This patch adds a new ro.boot.init_rc kernel cmdline argument to support this. Bug: 26639863 Test: Tested on bullhead with androidboot.init_rc given a non-existent .rc file which leads to expected boot failures. Boot succeeds if androidboot.init_rc is not specified. Change-Id: I2bca1cc3de6720feced041fe87266fb8afcce8b0
This commit is contained in:
parent
bde89da5fc
commit
959aeb17d5
|
@ -800,7 +800,12 @@ int main(int argc, char** argv) {
|
|||
parser.AddSectionParser("service",std::make_unique<ServiceParser>());
|
||||
parser.AddSectionParser("on", std::make_unique<ActionParser>());
|
||||
parser.AddSectionParser("import", std::make_unique<ImportParser>());
|
||||
parser.ParseConfig("/init.rc");
|
||||
std::string bootscript = property_get("ro.boot.init_rc");
|
||||
if (bootscript.empty()) {
|
||||
parser.ParseConfig("/init.rc");
|
||||
} else {
|
||||
parser.ParseConfig(bootscript);
|
||||
}
|
||||
|
||||
ActionManager& am = ActionManager::GetInstance();
|
||||
|
||||
|
|
Loading…
Reference in New Issue