Skip to content

Commit 943dba1

Browse files
committed
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
1 parent f7d3ae2 commit 943dba1

File tree

1 file changed

+1
-29
lines changed

1 file changed

+1
-29
lines changed

rootdir/init.rc

+1-29
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,12 @@ loglevel 3
2727
export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
2828
export LD_LIBRARY_PATH /vendor/lib:/system/lib
2929
export ANDROID_BOOTLOGO 1
30-
export ANDROID_CACHE /cache
3130
export ANDROID_ROOT /system
3231
export ANDROID_ASSETS /system/app
3332
export ANDROID_DATA /data
3433
export ASEC_MOUNTPOINT /mnt/asec
3534
export LOOP_MOUNTPOINT /mnt/obb
3635
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
37-
export TERMINFO /system/etc/terminfo
38-
export TERM linux
3936

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

203-
mkdir /cache/dalvik-cache 0771 system system
204-
chown system system /cache/dalvik-cache
205-
chmod 0771 /cache/dalvik-cache
206-
207200
# create resource-cache and double-check the perms
208201
mkdir /data/resource-cache 0771 system system
209202
chown system system /data/resource-cache
@@ -223,7 +216,7 @@ on post-fs-data
223216
#setprop vold.post_fs_data_done 1
224217

225218
# Include extra init file
226-
import /system/etc/init.local.rc
219+
import /init.cm.rc
227220

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

289-
chown system system /sys/block/mmcblk0/queue/scheduler
290-
chmod 0664 /sys/block/mmcblk0/queue/scheduler
291-
292282
chown system system /sys/class/timed_output/vibrator/enable
293283
chown system system /sys/class/leds/keyboard-backlight/brightness
294284
chown system system /sys/class/leds/lcd-backlight/brightness
@@ -330,16 +320,6 @@ on boot
330320
setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
331321
setprop net.tcp.buffersize.evdo 4094,87380,262144,4096,16384,262144
332322

333-
# allow system to modify ksm control files
334-
chown root system /sys/kernel/mm/ksm/pages_to_scan
335-
chmod 0664 /sys/kernel/mm/ksm/pages_to_scan
336-
chown root system /sys/kernel/mm/ksm/sleep_millisecs
337-
chmod 0664 /sys/kernel/mm/ksm/sleep_millisecs
338-
chown root system /sys/kernel/mm/ksm/run
339-
chmod 0664 /sys/kernel/mm/ksm/run
340-
write /sys/kernel/mm/ksm/sleep_millisecs 1500
341-
write /sys/kernel/mm/ksm/pages_to_scan 256
342-
343323
# Set this property so surfaceflinger is not started by system_init
344324
setprop system_init.startsurfaceflinger 0
345325

@@ -521,11 +501,3 @@ service mdnsd /system/bin/mdnsd
521501
socket mdnsd stream 0660 mdnsr inet
522502
disabled
523503
oneshot
524-
525-
# adb over network
526-
on property:service.adb.tcp.port=5555
527-
stop adbd
528-
start adbd
529-
on property:service.adb.tcp.port=-1
530-
stop adbd
531-
start adbd

0 commit comments

Comments
 (0)