From bae9ba340267225438900654a05bd1113998ecfb Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Thu, 9 Mar 2017 12:35:02 -0800 Subject: [PATCH] init.rc: make sure netd start after post-fs-data Current init doesn't order the triggeres it scaned, and there is no guarantee that general event trigger exec first and then event+property triggers. This CL will make sure netd started after post-fs-data trigger is done. Bug: 35110957 Test: marlin boots Change-Id: I7bb55af4e00f336682388abfa8a06eac2136b7d4 --- rootdir/init.rc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/rootdir/init.rc b/rootdir/init.rc index f1b047e9d..4a9118944 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -302,12 +302,6 @@ on late-init trigger early-boot trigger boot -on post-fs-data && property:ro.crypto.state=encrypted && property:ro.crypto.type=file - start netd - -on zygote-start && property:ro.crypto.state=encrypted && property:ro.crypto.type=file - start zygote - on post-fs start logd # once everything is setup, no need to modify / @@ -499,6 +493,13 @@ on post-fs-data # Set indication (checked by vold) that we have finished this action #setprop vold.post_fs_data_done 1 +# This trigger will be triggered before 'zygote-start' since there is no zygote-start defined in +# current init.rc. It is recommended to put unnecessary data/ initialization from post-fs-data +# to start-zygote to unblock zygote start. +on zygote-start && property:ro.crypto.state=encrypted && property:ro.crypto.type=file + start netd + start zygote + on boot # basic network init ifup lo