#! /vendor/bin/sh
RILTYPE=$(/vendor/bin/getprop "persist.vendor.sys.ril.type")

if [ "$RILTYPE" = "QMI" ]
then
    insmod /vendor/lib/modules/4.14.119/kernel/drivers/usb/serial/sierra.ko
    insmod /vendor/lib/modules/4.14.119/kernel/drivers/net/usb/GobiNet.ko iAutoIPAddress=1
    insmod /vendor/lib/modules/4.14.119/kernel/drivers/usb/class/cdc-wdm.ko
    insmod /vendor/lib/modules/4.14.119/kernel/drivers/net/usb/cdc_ncm.ko
    insmod /vendor/lib/modules/4.14.119/kernel/drivers/net/usb/cdc_mbim.ko
elif [ "$RILTYPE" = "HL" ]
then
    insmod /vendor/lib/modules/4.14.119/kernel/drivers/net/usb/cdc_ncm.ko
elif [ "$RILTYPE" = "AT" ]
then
    insmod /vendor/lib/modules/4.14.119/kernel/drivers/usb/serial/sierra.ko
    insmod /vendor/lib/modules/4.14.119/kernel/drivers/net/usb/sierra_net.ko
elif [ "$RILTYPE" = "AR" ]
then
    insmod /vendor/lib/modules/4.14.119/kernel/drivers/usb/serial/sierra.ko
    insmod /vendor/lib/modules/4.14.119/kernel/drivers/net/usb/GobiNet.ko iAutoIPAddress=1
else
    # default use QMI RIL
    insmod /vendor/lib/modules/4.14.119/kernel/drivers/usb/serial/sierra.ko
    insmod /vendor/lib/modules/4.14.119/kernel/drivers/net/usb/GobiNet.ko iAutoIPAddress=1
    insmod /vendor/lib/modules/4.14.119/kernel/drivers/usb/class/cdc-wdm.ko
    insmod /vendor/lib/modules/4.14.119/kernel/drivers/net/usb/cdc_ncm.ko
    insmod /vendor/lib/modules/4.14.119/kernel/drivers/net/usb/cdc_mbim.ko
    
fi
