#!/bin/sh # set default values ENABLED="yes" ONSTART="no" ONSTOP="yes" if ! [[ -w /sys/devices/platform/mts-io/radio-reset ]] ; then exit 0 fi # load the values from /etc/default/radio-reset [ -r /etc/default/radio-reset ] && source /etc/default/radio-reset case $1 in start) if [[ $ENABLED == "yes" ]] && [[ $ONSTART == "yes" ]] ; then mts-io-sysfs store radio-reset 0 echo "Resetting cellular radio" fi ;; stop) if [[ $ENABLED == "yes" ]] && [[ $ONSTOP == "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 {start|stop|reload}" exit 2 ;; esac