summaryrefslogtreecommitdiff
path: root/recipes-core/udev/eudev/cellular_radios.sh
blob: cb9258b6a5fbed9b7c9101e3e0cec1b3b4e7e68a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
# Let mts-io know when the radio is ready
pid=$$
prefix="<3>cellular-discovery[${pid}]: "
loginfo()  { echo "${prefix}$@" >/dev/kmsg ; }

loginfo "cellular_radios.sh invoked"
READYFILE=/sys/devices/platform/mts-io/radio-udev-discovery
if [[ -f $READYFILE ]] ; then
    if (($(cat $READYFILE) == 0)) ; then
        loginfo "Cellular is now available"
    fi
    echo 1 >$READYFILE
fi