#give some/infinite time to enter PIN (if SIM requests PIN and only needed for IAP and call forwarding) #this will wait until cell modem gets online after switching if [ "$3" != "" -o "$7" != "" ]; then /usr/bin/dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:"We need to wait for cell modem to get online ..." uint32:4 string:"ack" sleep 3 scount=0 while [ "`cat /var/run/ssc`" != "online" ] do /usr/bin/dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"still waiting for cell modem to get online ..." if [ $scount < 30 ]; then sleep 3 let scount+=3 elif [ $scount < 60 ]; then sleep 5 let scount+=5 else sleep 10 fi done /usr/bin/dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:"Done, we are online!" uint32: string: fi
while [ "`cat /var/run/ssc`" != "online" ]