OSDN Git Service

init: move the init.sh execution to the post-fs stage
authorChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 3 Jun 2016 04:30:53 +0000 (12:30 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 3 Jun 2016 04:30:53 +0000 (12:30 +0800)
init.sh
init.x86.rc

diff --git a/init.sh b/init.sh
index 4e6f30c..c4529d2 100644 (file)
--- a/init.sh
+++ b/init.sh
@@ -6,8 +6,8 @@
 
 function set_property()
 {
 
 function set_property()
 {
-       # this must be run before post-fs stage
-       echo $1=$2 >> /x86.prop
+       setprop "$1" "$2"
+       [ -n "$DEBUG" ] && echo "$1"="$2" >> /dev/x86.prop
 }
 
 function init_misc()
 }
 
 function init_misc()
@@ -308,7 +308,6 @@ function do_init()
        init_hal_sensors
        init_tscal
        init_ril
        init_hal_sensors
        init_tscal
        init_ril
-       chmod 640 /x86.prop
        post_init
 }
 
        post_init
 }
 
index 5814e86..42ae1c3 100644 (file)
@@ -17,11 +17,12 @@ on init
     # Backward compatibility
     symlink system/lib /lib
 
     # Backward compatibility
     symlink system/lib /lib
 
-    exec -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh
-
 on fs
     mount_all /fstab.${ro.hardware}
 
 on fs
     mount_all /fstab.${ro.hardware}
 
+on post-fs
+    exec -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh
+
 on post-fs-data
     sysclktz 1
 
 on post-fs-data
     sysclktz 1
 
@@ -34,9 +35,6 @@ on post-fs-data
     # Set indication (checked by vold) that we have finished this action
     setprop vold.post_fs_data_done 1
 
     # Set indication (checked by vold) that we have finished this action
     setprop vold.post_fs_data_done 1
 
-on early-boot
-    readprops /x86.prop
-
 on boot
     setprop ro.radio.use-ppp yes
     setprop ro.radio.noril no
 on boot
     setprop ro.radio.use-ppp yes
     setprop ro.radio.noril no