diff options
author | Tom Cherry <tomcherry@google.com> | 2015-08-21 21:47:03 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-08-21 21:47:03 +0000 |
commit | 25c22bb9e71998d0358628052fc32a09ec53bbbf (patch) | |
tree | 82197ed15b20fd8bba7e134b45d11c83e2762e93 /init/builtins.cpp | |
parent | c7676b5037f56b3e1f2f7450f560e4834394995e (diff) | |
parent | 08a6775f8cdadf48e7b5f4f4d710180fda43b2b6 (diff) |
am 08a6775f: am 2d8be6c2: Merge "init: import init rc scripts from file systems after mount_all"
* commit '08a6775f8cdadf48e7b5f4f4d710180fda43b2b6':
init: import init rc scripts from file systems after mount_all
Diffstat (limited to 'init/builtins.cpp')
-rw-r--r-- | init/builtins.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/init/builtins.cpp b/init/builtins.cpp index ecfac50b7..7a4f7c15e 100644 --- a/init/builtins.cpp +++ b/init/builtins.cpp @@ -427,6 +427,19 @@ static int wipe_data_via_recovery() while (1) { pause(); } // never reached } +void import_late() +{ + static const std::vector<std::string> init_directories = { + "/system/etc/init", + "/vendor/etc/init", + "/odm/etc/init" + }; + + for (const auto& dir : init_directories) { + init_parse_config(dir.c_str()); + } +} + /* * This function might request a reboot, in which case it will * not return. @@ -478,6 +491,8 @@ int do_mount_all(const std::vector<std::string>& args) return -1; } + import_late(); + if (ret == FS_MGR_MNTALL_DEV_NEEDS_ENCRYPTION) { property_set("vold.decrypt", "trigger_encryption"); } else if (ret == FS_MGR_MNTALL_DEV_MIGHT_BE_ENCRYPTED) { |