View Single Post
Posts: 5 | Thanked: 0 times | Joined on Mar 2010 @ Netherlands
#4
So, this script checks for a gprs0 connection, and brings the APN online and loops until done before ssh'ing:
#/bin/bash
if
[ -d /sys/class/net/gprs0 ] && /sbin/ifconfig gprs0 | grep UP;
then
ssh irc;
else
dbus-send --type=method_call --system --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:"Vodafone GPRS" uint32:0;
for i in $(seq 0 10);
do
if
/sbin/ifconfig gprs0 | grep UP;
then
i=10;
else
sleep 1;
fi;
done;
ssh irc;
fi;