init.hikey.rc: move link creation of sdcard to post-fs section
Since /storage is mounted on post-fs in the default init.rc file.
Or we will see warnings like this:
audit: type=1400 audit(14.079:3): avc: denied { create } for pid=1 comm="init" name="sdcard" scontext=u:r:init:s0 tcontext=u:object_r:tmpfs:s0 tclass=lnk_file permissive=1
Change-Id: If11fc448ff2d81247a677fd825e974476be653a5
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
diff --git a/init.hikey.rc b/init.hikey.rc
index 3cd6fce..67b392b 100644
--- a/init.hikey.rc
+++ b/init.hikey.rc
@@ -7,10 +7,6 @@
# disable transparent huge pages
write /sys/kernel/mm/transparent_hugepage/enabled "never"
- # See storage config details at http://source.android.com/tech/storage/
- symlink /sdcard /mnt/sdcard
- symlink /sdcard /storage/sdcard0
-
# Disabled virtual memory randomization
# (if randomization is enabled the AEM-JIT will have a lower cache hit rate)
write /proc/sys/kernel/randomize_va_space 0
@@ -31,6 +27,13 @@
restorecon_recursive /data/local/tmp/lava
on post-fs
+
+ # For legacy support
+ # See storage config details at http://source.android.com/tech/storage/
+ # since /storage is mounted on post-fs in init.rc
+ symlink /sdcard /mnt/sdcard
+ symlink /sdcard /storage/sdcard0
+
# insert WiFi Modules
insmod /system/modules/rfkill.ko
insmod /system/modules/wifi/compat.ko