From 059c1482875feb1d57fd679e8fc2d27c6f9e63d1 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 31 Aug 2017 18:28:00 -0500 Subject: Add the carrierswitch stuff during boot for mtcap --- .../cell-radio-carrierswitch.init | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 recipes-core/multitech/cell-radio-carrierswitch/cell-radio-carrierswitch.init (limited to 'recipes-core/multitech/cell-radio-carrierswitch/cell-radio-carrierswitch.init') diff --git a/recipes-core/multitech/cell-radio-carrierswitch/cell-radio-carrierswitch.init b/recipes-core/multitech/cell-radio-carrierswitch/cell-radio-carrierswitch.init new file mode 100644 index 0000000..32b8d0d --- /dev/null +++ b/recipes-core/multitech/cell-radio-carrierswitch/cell-radio-carrierswitch.init @@ -0,0 +1,26 @@ +#!/bin/sh + +# no firmware switch by default +ENABLED="no" + +[ -r /etc/default/cell-radio-fwswitch ] && source /etc/default/cell-radio-fwswitch +[ "$ENABLED" == "yes" ] || exit 0 + +# It may take a couple of boots to get the APN straightened out. +# mlinux-switch-apn is only effective for LNA3. It will only +# take action if it detects a different SIM from the one +# that is configured. It requires a RADIO that is active. +# The script is executed in the background to prevent holding up the +# boot. + +case $1 in + start) + (/usr/sbin/mlinux-switch-apn 2>&1 | logger -p daemon.notice) & + ;; + + *) + echo "Usage: $0 {start}" + exit 2 + ;; +esac + -- cgit v1.2.3