Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 943dba18 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

init.rc: Fix compcache and cleanup init file

The "import" keyword is only parsed once, for a one shot execution, during
the initial section setup, and before running "on fs". Having an import of
a file that's located in a filesystem other than root will result in an error
like

<3> init: could not import file '/system/etc/init.local.rc' from '/init.rc'

So... any files imported into init need to be moved to the root fs.
While we're at it, move init.rc changes that are specific to CM (and don't
involve modification of preexisting configs) into this file, to ease future
upstream merges.

Change-Id: I0f70ffad874648198acde67c12e1a7833552ad7c
parent f7d3ae2e
Loading
Loading
Loading
Loading
+1 −29
Original line number Diff line number Diff line
@@ -27,15 +27,12 @@ loglevel 3
    export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
    export LD_LIBRARY_PATH /vendor/lib:/system/lib
    export ANDROID_BOOTLOGO 1
    export ANDROID_CACHE /cache
    export ANDROID_ROOT /system
    export ANDROID_ASSETS /system/app
    export ANDROID_DATA /data
    export ASEC_MOUNTPOINT /mnt/asec
    export LOOP_MOUNTPOINT /mnt/obb
    export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar
    export TERMINFO /system/etc/terminfo
    export TERM linux

# Backward compatibility
    symlink /system/etc /etc
@@ -200,10 +197,6 @@ on post-fs-data
    chown system system /data/dalvik-cache
    chmod 0771 /data/dalvik-cache

    mkdir /cache/dalvik-cache 0771 system system
    chown system system /cache/dalvik-cache
    chmod 0771 /cache/dalvik-cache

    # create resource-cache and double-check the perms
    mkdir /data/resource-cache 0771 system system
    chown system system /data/resource-cache
@@ -223,7 +216,7 @@ on post-fs-data
    #setprop vold.post_fs_data_done 1

# Include extra init file
    import /system/etc/init.local.rc
    import /init.cm.rc

on boot
# basic network init
@@ -286,9 +279,6 @@ on boot
    chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
    chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

    chown system system /sys/block/mmcblk0/queue/scheduler
    chmod 0664 /sys/block/mmcblk0/queue/scheduler

    chown system system /sys/class/timed_output/vibrator/enable
    chown system system /sys/class/leds/keyboard-backlight/brightness
    chown system system /sys/class/leds/lcd-backlight/brightness
@@ -330,16 +320,6 @@ on boot
    setprop net.tcp.buffersize.gprs    4092,8760,11680,4096,8760,11680
    setprop net.tcp.buffersize.evdo    4094,87380,262144,4096,16384,262144

# allow system to modify ksm control files
    chown root system /sys/kernel/mm/ksm/pages_to_scan
    chmod 0664 /sys/kernel/mm/ksm/pages_to_scan
    chown root system /sys/kernel/mm/ksm/sleep_millisecs
    chmod 0664 /sys/kernel/mm/ksm/sleep_millisecs
    chown root system /sys/kernel/mm/ksm/run
    chmod 0664 /sys/kernel/mm/ksm/run
    write /sys/kernel/mm/ksm/sleep_millisecs 1500
    write /sys/kernel/mm/ksm/pages_to_scan 256

# Set this property so surfaceflinger is not started by system_init
    setprop system_init.startsurfaceflinger 0

@@ -521,11 +501,3 @@ service mdnsd /system/bin/mdnsd
    socket mdnsd stream 0660 mdnsr inet
    disabled
    oneshot

# adb over network
on property:service.adb.tcp.port=5555
    stop adbd
    start adbd
on property:service.adb.tcp.port=-1
    stop adbd
    start adbd