start on stopped modempower ok

# Check what is the TIL type set by the TILSetup script
# if there is no TIL type set we default to GSM TIL
 
script

if  [ -f /var/lib/til/RdoT ];then
 logger -p info "Read From Existing Token file"
 export radioType=`cat /var/lib/til/RdoT`
else
 logger -p info "Executing ModemInfo"
 modeminfo=`/usr/bin/PmModemInfo || true`
 logger -p info "Reading Token After ModemInfo"
 export radioType=`cat /var/lib/til/RdoT`
fi

if [ "$radioType" != "UMTS" -a "$radioType" != "CDMA" ];then
  modeminfo=`/usr/bin/PmModemInfo || true`
  logger -p info "Executed ModemInfo AGAIN and Reading Token"
  export radioType=`cat /var/lib/til/RdoT`
fi

# start the approprate TIL
if [ "$radioType" = "UMTS" ];then
 logger -p info "Launch UMTS TIL"
 exec /usr/bin/TelephonyInterfaceLayerGsm
elif [ "$radioType" = "CDMA" ];then
 logger -p info "Launch CDMA TIL"
 exec /usr/bin/TelephonyInterfaceLayerCdma
else
 logger -p emerg "********** Unknown Radio Launching Default CDMA TIL ************"
 exec /usr/bin/TelephonyInterfaceLayerCdma
fi

end script

respawn

