Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 959aeb17 authored by Hung-ying Tyan's avatar Hung-ying Tyan
Browse files

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
parent bde89da5
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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>());
    std::string bootscript = property_get("ro.boot.init_rc");
    if (bootscript.empty()) {
        parser.ParseConfig("/init.rc");
    } else {
        parser.ParseConfig(bootscript);
    }

    ActionManager& am = ActionManager::GetInstance();