-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.insmod.sh
executable file
·28 lines (24 loc) · 795 Bytes
/
init.insmod.sh
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
#! /vendor/bin/sh
#########################################
### init.insmod.cfg format: ###
### --------------------------------- ###
### [insmod|setprop] [path|prop name] ###
### ... ###
#########################################
if [[ -e "/vendor/etc/init.insmod_charger.cfg" && "$(getprop ro.boot.mode)" == "charger" ]]; then
cfg_file="/vendor/etc/init.insmod_charger.cfg"
else
cfg_file="/vendor/etc/init.insmod.cfg"
fi
if [ -f $cfg_file ]; then
while IFS=" " read -r action name
do
case $action in
"insmod") insmod $name ;;
"setprop") setprop $name 1 ;;
esac
done < $cfg_file
fi
# set property even if there is no insmod config
# as property value "1" is expected in early-boot trigger
setprop sys.all.modules.ready 1