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

Commit 6e152c2a authored by Lucchetto's avatar Lucchetto Committed by Łukasz Patron
Browse files

init: Run vendor-specific init hooks on post-fs



* On <= lineage-16.0 vendor init props were loaded
  during load_system_props() that was called on
  post-fs. This change restores the old behavior,
  which coincidentally allows us to read files in
  /dev/block/* (and probably more) during boot time.

Change-Id: I10072797f49b34ab05a5df068d042b8c5ddc0fb6
Signed-off-by: default avatarLucchetto <lucchetto.tie@live.com>
parent efc798df
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -496,6 +496,9 @@ Commands
> Loads persistent properties when /data has been decrypted.
  This is included in the default init.rc.

`vendor_load_properties`
> Update with vendor-specific property runtime overrides

`loglevel <level>`
> Sets the kernel log level to level. Properties are expanded within _level_.

+7 −0
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@
#include "service.h"
#include "subcontext.h"
#include "util.h"
#include "vendor_init.h"

using namespace std::literals::string_literals;

@@ -1058,6 +1059,11 @@ static Result<Success> do_load_system_props(const BuiltinArguments& args) {
    return Success();
}

static Result<Success> do_vendor_load_properties(const BuiltinArguments& args) {
    vendor_load_properties();
    return Success();
}

static Result<Success> do_wait(const BuiltinArguments& args) {
    auto timeout = kCommandRetryTimeout;
    if (args.size() == 3) {
@@ -1221,6 +1227,7 @@ const BuiltinFunctionMap::Map& BuiltinFunctionMap::map() const {
        {"interface_stop",          {1,     1,    {false,  do_interface_stop}}},
        {"load_persist_props",      {0,     0,    {false,  do_load_persist_props}}},
        {"load_system_props",       {0,     0,    {false,  do_load_system_props}}},
        {"vendor_load_properties",  {0,     0,    {false,  do_vendor_load_properties}}},
        {"loglevel",                {1,     1,    {false,  do_loglevel}}},
        {"mark_post_data",          {0,     0,    {false,  do_mark_post_data}}},
        {"mkdir",                   {1,     4,    {true,   do_mkdir}}},
+0 −4
Original line number Diff line number Diff line
@@ -64,7 +64,6 @@
#include "selinux.h"
#include "subcontext.h"
#include "util.h"
#include "vendor_init.h"

using namespace std::literals;

@@ -913,9 +912,6 @@ void property_load_boot_defaults(bool load_debug_prop) {
        }
    }

    // Update with vendor-specific property runtime overrides
    vendor_load_properties();

    property_initialize_ro_product_props();
    property_derive_build_fingerprint();

+2 −0
Original line number Diff line number Diff line
@@ -350,6 +350,8 @@ on early-fs
    start vold

on post-fs
    vendor_load_properties

    exec - system system -- /system/bin/vdc checkpoint markBootAttempt

    # Once everything is setup, no need to modify /.