From f7c2585f6d6a24f504df1d66db0b87e4bb5b9395 Mon Sep 17 00:00:00 2001 From: Jooyung Han Date: Fri, 7 Aug 2020 10:11:48 +0900 Subject: [PATCH] Fix the order for boot scripts scanning To support "override" services, we need to scan partitions from least speicific to most specific. Bug: 163021585 Test: m Change-Id: I26a6de4f7fb571c60038e803137a4b1c237792fd --- init/init.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/init/init.cpp b/init/init.cpp index cb5bbbab9..7d00538bb 100644 --- a/init/init.cpp +++ b/init/init.cpp @@ -310,14 +310,14 @@ static void LoadBootScripts(ActionManager& action_manager, ServiceList& service_ // late_import is available only in Q and earlier release. As we don't // have system_ext in those versions, skip late_import for system_ext. parser.ParseConfig("/system_ext/etc/init"); - if (!parser.ParseConfig("/product/etc/init")) { - late_import_paths.emplace_back("/product/etc/init"); + if (!parser.ParseConfig("/vendor/etc/init")) { + late_import_paths.emplace_back("/vendor/etc/init"); } if (!parser.ParseConfig("/odm/etc/init")) { late_import_paths.emplace_back("/odm/etc/init"); } - if (!parser.ParseConfig("/vendor/etc/init")) { - late_import_paths.emplace_back("/vendor/etc/init"); + if (!parser.ParseConfig("/product/etc/init")) { + late_import_paths.emplace_back("/product/etc/init"); } } else { parser.ParseConfig(bootscript);