-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstart
More file actions
49 lines (42 loc) · 1.15 KB
/
start
File metadata and controls
49 lines (42 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/system/bin/sh
#
# W.I.P. script, by USBhost.
#
# I use busybox for some commands because
# in the hopes of them being newer.
#
# The 'FI.d' folder
# is meant for values that do not stay at boot
# Load Symbols
. /system/etc/FI.d/symbols;
# Script pacific Symbol
LC="start";
# Wake lock is needed because if the system suspends
# FI.d/init.d scripts will not run.
echo fi_lock > /sys/power/wake_lock;
$LOGCATI$LC "$(id)";
# Mount cache
# FIXME: start doesn't know if cache is swap.
MCACHE;
if [ "$MCACHE" == "" ]; then
$BB mount -t auto -o rw $CACHE /cache;
MCACHE;
if [ "$MCACHE" != "$CACHE" ]; then
$LOGCATI$LC " cache; mount failed ";
elif [ "$MCACHE" == "$CACHE" ]; then
$LOGCATI$LC " cache; mount successful ";
$BB fstrim /cache;
fi
elif [ "$MCACHE" == "$CACHE" ]; then
$LOGCATI$LC " cache; is already mounted ";
fi
# SuperSU system root
# Note: this will need a modded SuperSU installer
# that does not change app_process.
if [ ! -e /data/su.img ]; then
/system/xbin/bash -c "/system/xbin/daemonsu --auto-daemon &disown";
fi
# Start init.d
if [ ! -e /system/bin/sysinit ]; then
$BB run-parts /system/etc/init.d;
fi