Files
device_google_redfin/init.insmod.sh
Alex Hong 1c2dbd8222 Create aosp_redfin target
Bug: 139478768
Change-Id: I061f89a72b5e7b81280406abf85cca479b86f340
2019-08-19 12:39:55 +08:00

32 lines
870 B
Bash
Executable File

#!/vendor/bin/sh
########################################################
### init.insmod.cfg format: ###
### ----------------------------------------------- ###
### [insmod|setprop|enable/moprobe] [path|prop name] ###
### ... ###
########################################################
if [ $# -eq 1 ]; then
cfg_file=$1
else
exit 1
fi
if [ -f $cfg_file ]; then
while IFS="|" read -r action arg
do
case $action in
"insmod") insmod $arg ;;
"setprop") setprop $arg 1 ;;
"enable") echo 1 > $arg ;;
"modprobe") modprobe -a -d /vendor/lib/modules $arg ;;
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 vendor.all.modules.ready 1
setprop vendor.all.devices.ready 1