summaryrefslogtreecommitdiff
path: root/recipes-bsp/multitech/mts-io/radio-reset.init
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/multitech/mts-io/radio-reset.init')
-rw-r--r--recipes-bsp/multitech/mts-io/radio-reset.init18
1 files changed, 14 insertions, 4 deletions
diff --git a/recipes-bsp/multitech/mts-io/radio-reset.init b/recipes-bsp/multitech/mts-io/radio-reset.init
index 00bbe2b..f469df4 100644
--- a/recipes-bsp/multitech/mts-io/radio-reset.init
+++ b/recipes-bsp/multitech/mts-io/radio-reset.init
@@ -2,19 +2,29 @@
ENABLED="yes"
+if ! [[ -w /sys/devices/platform/mts-io/radio-reset ]] ; then
+ exit 0
+fi
[ -r /etc/default/radio-reset ] && source /etc/default/radio-reset
-[ "$ENABLED" == "yes" ] || exit 0
case $1 in
+ start)
+ if [[ $ENABLED == "yes" ]] && [[ $START == "yes" ]] ; then
+ mts-io-sysfs store radio-reset 0
+ echo "Resetting cellular radio"
+ fi
+ ;;
stop)
- if [ -w /sys/devices/platform/mts-io/radio-reset ] ; then
+ if [[ $ENABLED == "yes" ]] && [[ $STOP == "yes" ]] ; then
mts-io-sysfs store radio-reset 0
echo "Resetting cellular radio"
fi
;;
-
+ reload)
+ mts-io-sysfs store radio-reset 0
+ ;;
*)
- echo "Usage: $0 {stop}"
+ echo "Usage: $0 {start|stop|reload}"
exit 2
;;
esac